All Forums Database
mfgfd 3 posts Joined 11/08
29 Jul 2014
remove line feed, carriage return from column

does anyone know how to remove some non-printable characters from a string in a column?
I imported data via OLE-LOAD from a MS SQL server. At least one column contains '0D0A'XB or '0A'XB. This delivers undesired results when exporting via Parallel transporter. So I have to remove those hex Strings, but
Oreplace(column, '0D0A'XB, '2020'XB) is not allowed
Is there a way in Teradata (now I export and remove in HeX-Editor)
Thanks for help

Raja_KT 1246 posts Joined 07/09
29 Jul 2014

Which version of Td you are using?
You can contact your DBA. Companies are driven by policies, NDA, software program downloads etc. :)
Maybe you can see few UDFs somewhere like

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

dnoeth 4628 posts Joined 11/04
29 Jul 2014

'0D0A'XB returns a binary string, you need to change it to '0D0A'XC.
And instead of oReplace you better use oTranslate to remove both characters independently:
oTranslate(column, '0D0A'XC, '  ') or to actually remove it oTranslate(column, '0D0A'XC, '')


You must sign in to leave a comment.