Oracle 假脱机设置
当我将多个选择查询输出假脱机到 txt 文件时。我在每个选择查询后看到空的新行,我该如何摆脱它。
define spool_file = 'D:\test1'
--set serveroutput on;
SET ECHO OFF
SET NEWPAGE 0
SET SPACE 0
SET PAGESIZE 0
SET FEEDBACK OFF
SET HEADING OFF
-- set echo on ;
spool D:\test1;
select 'H,correction.csv,' || to_char(sysdate,'DD/MM/YYYY') from dual;
select 'D,' ||record_id from cl_record where status=15;
select 'T,correction.csv,' from cl_record where status=15;
spool off;
When i spool the multiple select query output to a txt file. I see empty new lines after each select query how can i get rid of it.
define spool_file = 'D:\test1'
--set serveroutput on;
SET ECHO OFF
SET NEWPAGE 0
SET SPACE 0
SET PAGESIZE 0
SET FEEDBACK OFF
SET HEADING OFF
-- set echo on ;
spool D:\test1;
select 'H,correction.csv,' || to_char(sysdate,'DD/MM/YYYY') from dual;
select 'D,' ||record_id from cl_record where status=15;
select 'T,correction.csv,' from cl_record where status=15;
spool off;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试 TRIMSPOOL
我将您的脚本更改为
输出为
Try TRIMSPOOL
I changed your script to
The output was