oracle – Using substring in SQL update statement
Here is one way:
UPDATE CUST_INFO cust SET CUST_NAME = SUBSTR(CUST_NAME, 1, 92) || _CHECKED WHERE process_timestamp is null;
Also, if you want to update any records, then use
is null rather than
= null (the latter never evaluates to true).
Note: Not all databases have the
left() function, you can use
substr() or the equivalent instead.