Cleaning Strings with TRANSLATE and REPLACE
Published September 21, 2025
By Sai Sree Ram Gundepudi
For advanced cleaning, use TRANSLATE combined with REPLACE:
SELECT TRIM(TRANSLATE(REPLACE(LOWER('INV#8674767JSDEPOSIT PO12345678'),'inv','|'),
'abcdefghijklmnopqrstuvwxyz()- +/,.#',' ')) AS out_put
FROM dual;This replaces INV with | and strips alphabetic characters, leaving numeric codes separated by delimiters.