mattboy_slim
04-23-2003, 03:40 PM
OK, what I'd like, in theory, is to have multiple WHERE statements.
To show what I mean, I'll explain my problem:
------------
I currently have a database of events, some events span mutiple weeks, which start and end in different months. Right now I have a query which finds events that occur in January. My problem is, I can either find events that begin in January, or that end in January. My database has fields for date start, and for date end.
Right now, I have 2 conflicting events. 1 of them starts in December and ends in January. The other starts in January and ends in February. Right now, my SQL query looks like such:
"Select * from t_events where ev_dt_start BETWEEN '1/1/2004' AND '1/31/2004'
So since I'm grabbing the events that START in January, I'm only getting one of my events. If I change the where statement to ev_dt_end I only get the other event.
Thanks guys, the help is appreciated.
Matt
To show what I mean, I'll explain my problem:
------------
I currently have a database of events, some events span mutiple weeks, which start and end in different months. Right now I have a query which finds events that occur in January. My problem is, I can either find events that begin in January, or that end in January. My database has fields for date start, and for date end.
Right now, I have 2 conflicting events. 1 of them starts in December and ends in January. The other starts in January and ends in February. Right now, my SQL query looks like such:
"Select * from t_events where ev_dt_start BETWEEN '1/1/2004' AND '1/31/2004'
So since I'm grabbing the events that START in January, I'm only getting one of my events. If I change the where statement to ev_dt_end I only get the other event.
Thanks guys, the help is appreciated.
Matt