UPDATE [Customers]
SET [Address] = REPLACE([Address],'123456','02')
WHERE [CustomerID] = 4
this code replace 02 on 123456 but i want to change on 2 first digit is change to 023456 can any one help me Thank
UPDATE [Customers]
SET [Address] = REPLACE([Address],'123456','02')
WHERE [CustomerID] = 4
this code replace 02 on 123456 but i want to change on 2 first digit is change to 023456 can any one help me Thank
UPDATE [Customers]
SET [Address] = REPLACE([Address],'12','02')
WHERE [CustomerID] = 4
Assuming 12 don't repeat in the string.
Why do you put only '02' characters instead of '023456'? Are you having some situation where you have to put only first two characters, if not try following.
UPDATE [Customers] SET [Address] = REPLACE([Address],'123456','023456')
WHERE [CustomerID] = 4