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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 how to retrieve result with number in rownumber

Author  Topic 

kamii47
Constraint Violating Yak Guru

353 Posts

Posted - 2006-05-24 : 08:47:10
I am using rank function
i am getting result in this format

PID Quantity Rank
21 12 1
42 13 2
53 13 2
64 332 4
65 5435 5
..

how can i get result in the following format

PID Quantity Rank
21 12 1
42 13 2
53 13 2
64 332 3
65 5435 4
..

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-05-24 : 09:06:06
what is the difference between expected output and current ouput?

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-24 : 09:30:12
This should be done in front end application
In the function instead of count(col) use count(distinct col)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -