How To Remove The Carriage Return (CR) Characters From SQL*Plus Spooled Output On Windows (Doc ID 1638278.1)

Last updated on SEPTEMBER 09, 2016

Applies to:

SQL*Plus - Version 10.2.0.4 and later
Information in this document applies to any platform.

Goal

You find special characters <CR><LF> [carriage-return + line feed] at the end of each record in a normal output from a SQL*Plus spooled file.
Need a way to filter out <CR> and select only <LF>. 

For example:

Spooled output looks like this:

10 ACCOUNTING NEW YORK<CR><LF>
20 RESEARCH DALLAS<CR><LF>
30 SALES CHICAGO<CR><LF>
40 OPERATIONS BOSTON<CR><LF>

However, you want to generate a spool file like this:

10 ACCOUNTING NEW YORK<LF>
20 RESEARCH DALLAS<LF>
30 SALES CHICAGO<LF>
40 OPERATIONS BOSTON<LF>

How to Remove the Carriage Return (CR) characters from SQL*Plus Spooled Output on windows?
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms