When i run my query i receive the following message:
Invalid column name 'column1'
query:
SELECT TOP 1 * From (
(select Top 2 convert(datetime,column1,101) AS TEST from table1 ORDER BY column1 DESC) X
ORDER BY column1)
SELECT TOP 1 TEST
From (
SELECT Top 2
convert(datetime,column1,101) AS TEST,
column1 // <- include column1
FROM table1
ORDER BY column1 DESC
) X
ORDER BY column1 ASC
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments