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.
Author |
Topic |
Ratz03
Starting Member
27 Posts |
Posted - 2014-11-17 : 05:55:46
|
Hello,I have a dynamic sql that appends A,B, C etc to number likecase when xyz = 1 then Version + 'A' when xyz = 2 then Version + 'B' when xyz = 3 then Version + 'C' when xyz = 4 then Version + 'D' and so on till Z end AS Version_FinalPlease help me in using a function that can do it rather than writing a case 26 times. Many Thanks |
|
Kristen
Test
22859 Posts |
Posted - 2014-11-17 : 07:19:45
|
[code]SELECT Version + CHAR(64 + xyz) AS Version_Final[/code] |
|
|
Ratz03
Starting Member
27 Posts |
Posted - 2014-11-17 : 07:41:55
|
Thanks Kristen, worked perfectly. |
|
|
|
|
|