Index: openacs-4/packages/calendar/www/views-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/views-oracle.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/calendar/www/views-oracle.xql 6 May 2004 15:21:41 -0000 1.5
+++ openacs-4/packages/calendar/www/views-oracle.xql 15 May 2007 20:14:21 -0000 1.6
@@ -5,23 +5,28 @@
- select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
+ select /*+ ORDERED */
+ to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
to_number(to_char(start_date,'HH24'),'90') as start_hour,
+ to_number(to_char(start_date,'MI'),'90') as start_minutes,
+ to_number(to_char(start_date,'SSSSS'),'99990') as start_seconds,
to_number(to_char(end_date,'HH24'),'90') as end_hour,
to_number(to_char(end_date,'MI'),'90') as end_minutes,
+ to_number(to_char(end_date,'SSSSS'),'99990') as end_seconds,
nvl(e.name, a.name) as name,
nvl(e.status_summary, a.status_summary) as status_summary,
+ nvl(e.description, a.description) as description,
e.event_id as item_id,
(select type from cal_item_types where item_type_id= ci.item_type_id) as item_type,
cals.calendar_id,
cals.calendar_name
$additional_select_clause
- from acs_activities a,
+ from cal_items ci,
acs_events e,
timespans s,
time_intervals t,
- cal_items ci,
+ acs_activities a,
calendars cals
where e.timespan_id = s.timespan_id
and s.interval_id = t.interval_id
@@ -35,6 +40,41 @@
$order_by_clause
+
+
+
+ select
+ to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
+ to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
+ to_number(to_char(start_date,'HH24'),'90') as start_hour,
+ to_number(to_char(end_date,'HH24'),'90') as end_hour,
+ to_number(to_char(end_date,'MI'),'90') as end_minutes,
+ nvl(e.name, a.name) as name,
+ nvl(e.status_summary, a.status_summary) as status_summary,
+ nvl(e.description, a.description) as description,
+ e.event_id as item_id,
+ (select type from cal_item_types where item_type_id= ci.item_type_id) as item_type,
+ cals.calendar_id,
+ cals.calendar_name
+ $additional_select_clause
+ from cal_items ci,
+ acs_events e,
+ timespans s,
+ time_intervals t,
+ acs_activities a,
+ calendars cals
+ where e.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and e.activity_id = a.activity_id
+ and start_date between $interval_limitation_clause
+ and ci.cal_item_id = e.event_id
+ and cals.calendar_id = ci.on_which_calendar
+ and e.event_id = ci.cal_item_id
+ $additional_limitations_clause
+ $calendars_clause
+ $order_by_clause
+
+