hi..
i have a database table just like below.
___________________________________
cliencode InvoiceNo datetime
1 1001 10/10/2011
1 1002 10/10/2011
1 1003 10/10/2011
2 1004 10/10/2011
2 1005 10/10/2011
2 1006 10/10/2011
3 1007 10/10/2011
1 1008 10/10/2011
1 1009 10/10/2011
2 1010 10/10/2011
___________________________________
now i want to find ranking of client code so how it is possible.
please help
Loading
Kanhialal kkPosted Apr 12, 2012, 8:43 AM
select CCode,InvoiceNo,RANK() OVER(order by ccode desc)as RankByCCode from InvoiceNo
Server: Msg 195, Level 15, State 10, Line 1
'RANK' is not a recognized function name.
one thing i aware you that i am using sql server 2000... for database
please your help is needed
SenthilkumarPosted Apr 10, 2012, 6:59 AM
There are two functions in RANK.
RANK()
DENSE_RANK()