I'm not quite sure what you mean.. i'd write a query that returns a list of times and any events associated with that time, or nulls if there were no events. In oracle this could be pulled with a little trick like this:
SELECT
evt_time,
events.*
FROM
(
SELECT
trunc(sysdate) + (rownum + 7)/24 as evt_time
FROM
some_table_with_more_than_9 rows
WHERE
rownum < 10
) time_fake
LEFT OUTER JOIN
events
ON
evt_time = events.time
This takes a table, any table we dont care, with enough rows and pulls 9 rows out of it. We dont care what these rows are, we just want an increasing number from 1 to 9.
We take the current date today and chop the time off with trunc(), and then we take our row number 1 - 9 and turn this into a time of day from 8 am to 4pm by adding 7 to the rownum, and dividing it by 24 (because there are 24 hours in a day)
so our rownum:
1
2
3
becomes
8
9
10
becomes:
8/24
9/24
10/24
added to today's date, and we get datetime values of:
2 may 07, 8am
2 may 07, 9am
2 may 07, 10am
-
then, we left outer join that to our events table.
any event with a time mathcing that, will be included. if there is no event, then we get nulls:
2 may 07 8am, swimming, pool, $5
2 may 07 9am, doctors, town, $0
2 may 07 10am, null, null, null
genius eh?