Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Adding alphabet to a number to make it unique

$
0
0
create table #temp_Alpha_num ( [uniquenum] [int] Not NULL, [Somenum] [int] Not NULL,)Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 1 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 2 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 3 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 4 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 5 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 6 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 7 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values( 8 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 9 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 10 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 11 , 121)Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 12 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 13 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 14 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 15 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 16 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 17 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 18 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 19 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 20 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 21 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 22 , 121) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 23 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 24 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 25 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 26 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 27 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 28 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 29 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 30 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 31 , 101) Insert into #temp_Alpha_num(uniquenum,Somenum)values ( 32 , 101)for the somenum column I need to add alphabets to make them unique. for example 121a,121b,121c....121z,121aa,121ab,101a and so on...Could you guys please help. I dont know where to start..

Viewing all articles
Browse latest Browse all 3145

Trending Articles