I don't think it's the compatibility level...
Looks more like a typo: ROWNUMBER vs. ROW_NUMBER()
Underscores sometimes matter 😛
The RowNumber function is for Reporting Services.
Lutz
A pessimist is an optimist with experience. How to get fast answers to your question[/url]
How to post performance related questions[/url]
Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]