I have a table with 2 date fields startdate and enddate. A program have a start date and an end date like this 01/01/2011-25/03/2011 .
Now I want to test any date and get the program it belongs to. Say for the above, 12/01/2011 would return the above program.
I have tried 3 ways and this one seemed to have worked but I notice it is not correct always:
SELECT * FROM TBL where startdate<=#date# and enddate>=#date@