I am trying to do an update to the table below, in that I insert the value of Field1 into Field2 minus 1.
Both fields are CHAR(3), hence the convert. The result I get is B5, when I am trying to get B05. Any guidance on the syntax would be appreciated.
SET Field1 = 'B' + RIGHT('00' + (CONVERT(INT,RIGHT(Field2,2))-1),2)
WHERE Field2 IS NULL;