i have a problem in a task assigned to me in sql 2005
i have table contains column called ID which is an integer
i would to retrieve top 10 rows order by ID in descending order and i want the result of this query to be in ascending order .
when i tried the following query
SELECT * FROM
SELECT top 10 * FROM tableX ORDER BY ID DESC
) AS A
ORDER BY A.ID ASC
It gives error and when i searched about it i found that i cant to order by on the data retrieved from a sub query.
I hope any one can solve my problem??