I have a variable,
DECLARE @CN int = (SELECT [CONTROL_NUMBER] FROM myTable)
I need to do an insert statement where the value of this variable is incremented during run time.
So,
INSERT INTO myTable2 (ControlNumber)
SELECT CNC+(@CN increment the value here) FROM aTable
So the values inserted will be like,
aa1234
ab1235
cd1236...
etc.
Definitely @CN
is an int, so I will account for changing it to string before inserting the value.
Appreciate the help.
Thanks!