I have my HANA SQL query
select
replace_regexpr('[ \t]+$' in "id" with '' OCCURRENCE ALL)
from TABLE1
that will display the replaced trailing whitespaces for the column ID without updating the original values in the table.
How can I extend this query to actually save these replaced values back to the table corresponding to the respective IDs?
update TABLE1
set "id" = replace_regexpr('[ \t]+$' in "id" with '' OCCURRENCE ALL)
WHERE "id" LIKE_REGEXPR ' [ \t]+$'
This will set values of column "id"
based on the previous value in this column.