SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 alphabetical value based of count
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

PBoy
Starting Member

United Kingdom
17 Posts

Posted - 03/06/2014 :  16:36:59  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

397 Posts

Posted - 03/06/2014 :  16:45:19  Show Profile  Reply with Quote
char(count_value+63)
edit: sorry, should have been: char(count_value+64)

Edited by - bitsmed on 03/06/2014 16:50:13
Go to Top of Page

PBoy
Starting Member

United Kingdom
17 Posts

Posted - 03/06/2014 :  16:58:40  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000