I'm trying to change some data in database and I'm having some problems.
Scenario: Table A has a columnA with some data A123, B456, C789, 12345.
ColumnA
A123
B456
C789
12345
I'm trying to multiply the digits in the column by 2, leaving the letters as is.
The code I'm using is:
UPDATE Table A
SET
CoulmnA= Replace(CoulmnA,Left(CoulmnA,1),' ')
CoulmnA= CAST(CoulmnA AS INT)
CoulmnA= (AcctNo * 2)
CoulmnA= 'A' & AcctNo
WHERE Left(CoulmnA,1) = 'A'
Does any on know of a simple way to do this.
It will be much appreciated