I have a column num nvarchar(30) ... with values of the form 'ABC-0000001' which were to incremented automatically. The code I wrote works correctly until the value reaches to 'ABC-10000000'.
Am using ..
select top 1 @num=num from table order by num desc
always gives 'ABC-9999999' also max(num) gives the same...