I have a table MOVIE
with a column Desc
which stands for description.
I tried to sort by this column:
SELECT
* ,
ROW_NUMBER() OVER (ORDER BY [Desc] ASC) AS RowData
FROM
(SELECT
UID,
Title,
[Desc] AS '[Desc]'
FROM
MOVIE) AS RowTable
I get this error
Msg 207, Level 16, State 1, Line 3
Invalid column name 'Desc'
Anyone able to help?
Thank you.