question regarding select statement base

admin

Administrator
Staff member
I have a select statement I'm working on to find all valuses of 2 fields that do not have a start time or end time that would fall between a given time frame.

say I have some rows

home| away | start | end
001 | 002 |2001-08-06 08:00|2001-08-06 9:00
003 | 004 |2001-08-06 08:00|2001-08-06 9:00
005 | 006 |2001-08-06 10:00|2001-08-06 11:00

and I want to list all home or away teams that do not have a starttime or endtime between 09:15 and 10:30. Which based on the above data should be teams 001,002,003,004

Can this be done in a single select statement? or should I look into creating some temp tables.

Thanks,

Paul
 
Back
Top