remove line feed, carriage return from column

Database
Fan

remove line feed, carriage return from column

Hello,

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

Tags (2)
2 REPLIES
Enthusiast

Re: remove line feed, carriage return from column

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 

https://downloads.teradata.com/download/extensibility/teradata-udfs-for-popular-oracle-functions

http://developer.teradata.com/blog/madmac/2010/03/a-few-basic-scalar-string-udfs

Senior Apprentice

Re: remove line feed, carriage return from column

'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, '')