Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
events
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
events
Commits
3802e756
Commit
3802e756
authored
Mar 22, 2006
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- beutified the SQL statement
parent
cd9e90ac
Pipeline
#141
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
22 deletions
+35
-22
index-postgresql.xql
www/admin/index-postgresql.xql
+35
-22
No files found.
www/admin/index-postgresql.xql
View file @
3802e756
...
...
@@ -3,28 +3,41 @@
<fullquery
name=
"select_available_events_and_locations"
>
<querytext>
select CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
END as timespan,
coalesce(e.name, a.name) as name,
e.event_id,
v.city
from acs_activities a,
acs_events e,
events_activities ea,
events_events ee,
timespans s,
time_intervals t,
events_venues v
where e.timespan_id = s.timespan_id
and s.interval_id = t.interval_id
and e.activity_id = a.activity_id
and a.activity_id = ea.activity_id
and e.event_id = ee.event_id
and v.venue_id = ee.venue_id
and ee.available_p = 't'
and ea.package_id = :package_id
select
CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
THEN to_char(t.start_date, :date_format) ||
' (' || to_char(t.start_date, :time_format) || ' - ' ||
to_char(t.end_date, :time_format) || ')'
ELSE
to_char(t.start_date, :date_format) || ' ' ||
to_char(t.start_date, :time_format) || ' - ' ||
to_char(t.end_date, :date_format) || ' ' ||
to_char(t.end_date, :time_format)
END as timespan,
coalesce(e.name, a.name) as name,
e.event_id,
v.city
from
acs_activities a,
acs_events e,
events_activities ea,
events_events ee,
timespans s,
time_intervals t,
events_venues v
where
e.timespan_id = s.timespan_id
and s.interval_id = t.interval_id
and e.activity_id = a.activity_id
and a.activity_id = ea.activity_id
and e.event_id = ee.event_id
and v.venue_id = ee.venue_id
and ee.available_p = 't'
and ea.package_id = :package_id
order by
t.start_date DESC
</querytext>
</fullquery>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment