Oracle SQL Change Last Character of String
Posted on 2011-10-11
I usually work in MS SQL, but in Oracle, I need to change the last character of a value in a text field in TableA to a '7' if a value in field2 in TableB is '200'. (Both tables have the acct field.) Here is my code:
UPDATE (SELECT A.field1, B.field2
FROM TableA A, TableB B
WHERE A.acct=B.acct and B.field2 = '200')
SET A.field1 = left([field1],len([field1])-1) & '7';
Any help would be greatly appreciated! THANKS!