Question : SQL query help- today's date falls within two date fields

Hopefully this is an easy question for one of you gurus...  I just need the "WHERE" portion of the query.  I have two fields with a start date for travel and an end date for travel.  I need to return all records for which today falls within those two fields.  Thanks in advance!
Kat

Answer : SQL query help- today's date falls within two date fields

actually, i think i mistook your question, you have those two fields in the table:

select * from yourtable
where  getdate() between yourtable.startdate1 and yourtable. enddate1

or
where  yourtable.startdate1 < getdate()
and yourtable. enddate1> getdate()

the getdate() function will return the current server time...
Random Solutions  
 
programming4us programming4us