Skip to main content

UPDATE [Sheet1$$]
SET Customer = IIF(Customer LIKE '000%', SUBSTRING(Customer, 4), Customer)
WHERE Customer LIKE '000%';
Why this query is not working?

Customer
0001645445
0001026470
1645338
1645338
0001022163
1645426
1645338
1645370

Try this:

UPDATE [Sheet1$$]
SET Customer = RIGHT(Customer, LEN(Customer) - 3)
WHERE LEFT(Customer, 3) = '000';


Reply