Simplifying a update with replace function DML.
Is there a simplified way to turn below code (sample)
update A
set TERMS = trim(replace(TERMS,'-',','))
/
update A
set TERMS = trim(replace(TERMS,'A','B'))
/
update A
set TERMS = trim(replace(TERMS,'C','D'))
/
update A
set TERMS = trim(replace(TERMS,'E','F'))
/
update A
set TERMS = trim(replace(TERMS,'111','222'))
/
update A
set TERMS = trim(replace(TERMS,'......','......'))
Turn this code to a single script.
REPLACE(TERMS,'......','......)supposed to do? This will simply replace six consecutive period characters with six consecutive period characters. Seems kind of pointless to me. ??? I'd also like to suggest that the long version above is better code, because it's clear what's being done.