I am trying to query SQL, based on a date
For each term I have a record in the "TermDate" table:
TemName StartDate EndDate
Term 1 9/1/2007 11/21/2007
Term 2 11/22/2007 1/29/2008
Term 3 ... ...
Seems easy enough, but I can't get it to pull the appropriate record. if xDate = 9/20/2007, the query should return me Term 1, for example.
Both date fields are smalldate types
I tried using a "Between" statement, but that didnt go to well - any ideas?
For each term I have a record in the "TermDate" table:
TemName StartDate EndDate
Term 1 9/1/2007 11/21/2007
Term 2 11/22/2007 1/29/2008
Term 3 ... ...
Seems easy enough, but I can't get it to pull the appropriate record. if xDate = 9/20/2007, the query should return me Term 1, for example.
Both date fields are smalldate types
I tried using a "Between" statement, but that didnt go to well - any ideas?
Comment