Search code examples
sqloracle-databaselinefeed

Replace a line feed in SQL with TRANSLATE


Apparently Oracle appends a line feed character CHR(10) to the end of the default value when it stores it in the system catalogue.

I'm trying to replace a line feed in some SQL report data using the TRANSLATE function but I'm unsure of the syntax. Could someone please help me out?


Solution

  • Translate? If you're trying to replace it, then do so.

    select replace(some_value, chr(10), null) from ...
    

    which replaces chr(10) with null.