I'm trying to select the latest record before the provided date. For example, in the following scenario, I have a Tickets table:
Tickets
------------
TicketID (NUMBER 3,PK)
TicketDate (DATE)
EventName (VC2 50)
Example Data:
TicketID|TicketDate|Eventname
========================
1|1/3/2011|Concert A
2|5/4/2011|Concert B
3|6/3/2011|Concert C
4|7/5/2011|Concert D
In the above table, if I have a date of 6/1/2011, how do I select the latest record before that date (in this case, it would be TicketID=2)?
Thanks,
Tony