<p>I have a query where I wish to retrieve the oldest X records.  At present my query is something like the following:</p>

<pre><code>SELECT Id, Title, Comments, CreatedDate
FROM MyTable
WHERE CreatedDate &gt; @OlderThanDate
ORDER BY CreatedDate DESC
</code></pre>

<p>I know that normally I would remove the 'DESC' keyword to switch the order of the records, however in this instance I still want to get records ordered with the newest item first.</p>

<p>So I want to know if there is any means of performing this query such that I get the oldest X items sorted such that the newest item is first.  I should also add that my database exists on SQL Server 2005.</p>

[{'answer_id': 60882, 'author': 'Jason Punyon', 'author_id': 6212, 'author_profile': 'https://Stackoverflow.com/users/6212', 'pm_score': 6, 'selected': True, 'text': '<p>Why not just use a subquery?</p>\n\n<pre><code>SELECT T1.* \nFROM\n(SELECT TOP X Id, Title, Comments, CreatedDate\nFROM MyTable\nWHERE CreatedDate > @OlderThanDate\nORDER BY CreatedDate) T1\nORDER BY CreatedDate DESC\n</code></pre>\n'}, {'answer_id': 60883, 'author': 'Unsliced', 'author_id': 2902, 'author_profile': 'https://Stackoverflow.com/users/2902', 'pm_score': 1, 'selected': False, 'text': '<p>Embed the query. You take the top x when sorted in ascending order (i.e. the oldest) and then re-sort those in descending order ... </p>\n\n<pre><code>select * \nfrom \n(\n    SELECT top X Id, Title, Comments, CreatedDate\n    FROM MyTable\n    WHERE CreatedDate &gt; @OlderThanDate\n    ORDER BY CreatedDate \n) a\norder by createddate desc \n</code></pre>\n'}]
['https://Stackoverflow.com/questions/60877', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5086/']