Hi,
I have a table in a sql server 2008 database that contains bunch of records as well as a date column. The date is inserted automatically when a new entry to the table occurs. So, it contains the date of the record that has been created.
I am trying to run a query that would return me the earliest date and the latest date in this table.
I tried something like;
SELECT TOP(1) DateAdded AS firstdate FROM News ORDER BY DateAdded DESC; SELECT TOP(1) DateAdded AS lastdate FROM News ORDER BY DateAdded ASC;
but it only returned the 'firstdate'.
Can anyone guide me on how to achieve this?