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
 SQL Server Development (2000)
 Return a number with it's text rank

Author  Topic 

cardgunner

326 Posts

Posted - 2010-07-14 : 14:36:29
Is there a function where you a number field will be returned with it's rank such as 1 is 1st, 2 is 2nd, 3 is third, 11 is 11th, 31 is 31st, 91 is 91st and etc. I Could write this as a case statement but is there a easier/better way to do this?


CardGunner

sql-programmers
Posting Yak Master

190 Posts

Posted - 2010-07-15 : 06:12:26
Based on my assumption there no function to give the English suffix of a number. You need to add suffix only using CASE statement.

SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page

cardgunner

326 Posts

Posted - 2010-07-15 : 07:52:09
Thanks.

CardGunner
Go to Top of Page
   

- Advertisement -