I would like to auto-generate a column which has a mixture of both numbers and alphabets. Like AA01 or AC24. I want to start at AA00 until AA40. From here i will go to AB00 until AB40, and do likewise for other subsequent alphabets until the last one which will be AZ40. I just need a start off. I understand i can make use of the ASCII key but dont really understand how. Any help or suggestion is appreciated. Thank you.
tlox
0
Newbie Poster
Recommended Answers
Jump to Postcreate table #table ( id varchar(10) ) select * from #table declare @max varchar(10) declare @default varchar(10) declare @newid varchar(10) declare @alphabet char(1) declare @number char(2) select @default = 'AA00' if(exists (select 1 from #table)) begin select @max = max(id) from #table select @newid = 'A' if( …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.