sqlplus spooling: How to get rid of first, empty line?

北慕城南 提交于 2019-12-18 12:59:14

问题


I'm doing the following spooling statement:

SET VERIFY OFF
SET FEEDBACK OFF
SET HEADING OFF
SET TRIMSPOOL ON
SET TERM OFF
SPOOL &pathRelations
START scripts/relations.sql &parent
SPOOL OFF
SET TERM ON

The scripts/relations.sql file contains a simple select statement.

Unfortunately, the spooled file contains an empty line as the first one in the file. This line causes trouble in our framework.

Of course I could get rid of these line through sed but ain't there a way to suppress its creation in the first place?


回答1:


SET NEWPAGE NONE is the correct answer.

SET NEWPAGE 0 will cause a page feed, which is not what the OP wants.




回答2:


SET NEWPAGE 0

see here



来源:https://stackoverflow.com/questions/5576901/sqlplus-spooling-how-to-get-rid-of-first-empty-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!