I am building a database where I store some values along with a date field like 2001-03-14. The problem is that these values only are stored on weekdays not weekends. So if I have a date one a monday and want to select a row one day back how do I solve this the best way?
Thanks / Henrik
Try SELECT * FROM Table WHERE yourdate < '2001-03-14' ORDER BY yourdate DESC limit 1
Instead of 'limit 1' you can use TOP (1) after the SELECT.
Regards Ingo