2

I have a Spool of a Select as :

SET SERVEROUTPUT ON

WHENEVER SQLERROR EXIT 1

set heading off
set feedback off
set termout off
set echo off
set verify off
set pagesize 0
set line 1000
set trimspool on
spool &1
SELECT '9' || 'c' || chr(10) || myColumn
  FROM myTable;
spool off
set feedback on;
set term on;


exit;

The problem is that my output file is as folows:

9c
17

9c
17

9c
17

9c
17

9c
17

So As you see I have my Line Feed after 'c' but it adds a new line feed after myColumn also. Any ideas how to solv it ? My file will be loaded in Unix. I've tryied with a CR instead but then I'll have lines with CR and others with LF. I think it will fail between Unix and Windows.

user229044
  • 232,980
  • 40
  • 330
  • 338
CC.
  • 2,736
  • 11
  • 53
  • 70

1 Answers1

1
SET RECSEP OFF
SET RECSEP WRAPPED

http://ss64.com/ora/syntax-sqlplus-set.html

Jeffrey Kemp
  • 59,135
  • 14
  • 106
  • 158