开发者

Oracle Spool adds extra LF

开发者 https://www.devze.com 2023-01-20 06:02 出处:网络
I have a Spool of a Select as : SET SERVEROUTPUT ON WHENEVER SQLERROR EXIT 1 set heading off set feedback off

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;

T开发者_Go百科he 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.


SET RECSEP OFF
SET RECSEP WRAPPED

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号