Solved - [SQL] best way: diary functions.

2007-04-04 Thread Gary Stainburn
My solution that works is: select date_range as rdate, case when rsgsid is not null then 2 when aid is not null then 1 else 0 end as status from date_range('2007-04-01','2007-04-30') left join availability a on a.asid = 1 and (date_range,date_range) overlaps

[SQL] best way: diary functions.

2007-04-03 Thread Gary Stainburn
Hi folks I've got 2 tables, availabiliy ~~~ stdate date edate date workdaysinteger commentstext example record 2007-03-01 2007-03-07 5 Please can I have alternate days roster rdate date rdiag varchar(10) example 2007-03-01 B12 2007-03-03