I want script to convert my table
CREATE TABLE #TempTable (
Code nvarchar(5) primary key,
name nvarchar(100) )
Insert into #TempTable (Code ,name)
Select st.Code , st.name From StaticTable st
But there is something I must change.
Code must be autoincremented from 100
Where length of code is more than 3, then I want insert there integer, when not I want to copy this Code
So from
Code Name
ABCD Namezxc
EFGH Nameasd
IJK Nameqwe
I want get temptable with records:
Code Name
100 Namezxc
101 Nameasd
IJK Nameqwe
Best regards