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
 General SQL Server Forums
 New to SQL Server Programming
 alphabetical value based of count

Author  Topic 

PBoy
Starting Member

22 Posts

Posted - 2014-03-06 : 16:36:59
HI All,

Just wondering if there is another way to get the alphabetical value for a number other than using a case statement?

example:

Count = 1 That's = A
Count = 5 That's = E
Count = 8 That's = H

and so on I know a case could do this but wondering if there is a nice function or simple statement that would do this on the fly?

Any info would be great.

Cheers
Patrick

bitsmed
Aged Yak Warrior

545 Posts

Posted - 2014-03-06 : 16:45:19
char(count_value+63)
edit: sorry, should have been: char(count_value+64)
Go to Top of Page

PBoy
Starting Member

22 Posts

Posted - 2014-03-06 : 16:58:40
quote:
Originally posted by bitsmed

char(count_value+63)
edit: sorry, should have been: char(count_value+64)



Brilliant worked like a charm, thanks so much :)

Cheers
Patrick
Go to Top of Page
   

- Advertisement -