sqlplus remove \r \n \t from spool

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-06-09T14:06:31Z Indexed on 2010/06/09 14:22 UTC
Read the original article Hit count: 252

Filed under:
|
|

Hi all,

Is there any sql*plus command to remove \r \n and\t from the result set that's going out to the spool file? That is, "trim" every record?

We've used set trim on in the past, but it doesn't seem to bue what we need right now. I'm trying to avoid calling oracle's translate, chr functions in the sql query.

For example,

If my query returns this

|DATA|
|\n \t\t\t\t\t thisistheactualdata \t\t\t\t\t\t\n|

I'd like to keep this

|DATA|
|thisistheactualdata|

Thanks in advance.

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about sqlplus