Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sqlakm1
Starting Member
9 Posts |
Posted - 2013-03-01 : 00:47:04
|
Dear Experts,I have a sample data in table where data is like as per the attached screen. I want to take Rank as per the last column.Please help me how to do this.regards,AKM |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-01 : 01:16:24
|
[code]SELECT DENSE_RANK() OVER (PARTITION BY [Date],Name ORDER BY ID) AS rank,ID,[Sr.no],Name,[Date]FROM table[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
sqlakm1
Starting Member
9 Posts |
Posted - 2013-03-01 : 03:32:55
|
Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-01 : 03:34:40
|
wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|