Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

ROW_NUMBER OVER....WITHOUT PARTITION OPTION in sql server 2008 R2

$
0
0

Please, how to use "ORDER BY" clause if it is necessary to perform sorting on e.g., three levels e.g., LastName, FirstName and ParentsName?

Namely, if I use this syntax

Row_Number() Over (Order By LastName asc,  FirstName asc,  ParentsName asc) As RowId

it produces result set with taking into account only Order By LastName asc?

Or, using another words, how to perform sorting on level 1, level 2, level 3 likewise it is possible in EXCEL 2010 but, in sql server 2008 r2?

Thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>