In my Oracle 10g database I would like to remove "space characters" (spaces, tabs, carriage returns...) from the values of a table field.
Is TRANSLATE()
the way to go ? For example something like:
MY_VALUE := TRANSLATE(MY_VALUE,
CHR(9) || CHR(10) || CHR(11) || CHR(12) || CHR(13) || ' ', '');
Or is there any better alternative (something like [:space:]
in PHP PCRE) ?
Thanks for any piece of advice.
TRANSLATE
won't work because you have NULL as the third parameter. You could useTRANSLATE(my_value,'A'||CHR(9)||CHR(10)||CHR(11)||CHR(12)||CHR(13)||'','A')