SELECT [Column1] FROM VIEW1 WHERE ROW_NUMBER = 5;
gives an error:
Msg 207, Level 16, State 1, Line 2 Invalid column name ‘ROW_NUMBER’.
Any suggestions as to why? ROW_NUMBER is colored in a shade of pink automatically, which means from my knowledge “keyword” – so why does Sql Server think it should be a column and says the column doesn’t exist?
Thank you in advance.
The way you handle the query is wrong because
ROW_NUMBER Returns the sequential number of
a row within a partition of a result set,
starting at 1 for the first row in each partition.
You can try