-
I am having a problem with an asp page. I have a link that when you click it, it goes in my database and show the most recent record. Obviously there is date field, but i am not sure how you grab this record. Can anyone give me the correct sql code to achieve this result. I am ok on everything except the sql. I even have the database sorted by descending order by the date, so the most recent is on the top.
thanks
Stephen
-
you have a couple choices:
SQL like this:
select * from orders where orderdate in (select max(orderdate) from orders)
Or just open your recordset, sorted by date descending, and just display the first record