去除Oracle结果集中的空行

.千山. .千山. 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
写了一个Oracle脚本,select导出数据到txt文件中,分隔符‘|’,发现总是有空行。如图,

sqlplus -s /nolog <<!

connect da/da123;
set colsep '|';
set echo off;
set feedback off;
set verify off;
set term off;
set trimout on;
set termout off;
set heading off;
set newpage none;
set trimspool on;
set SQLPROMPT off;
set linesize 150;
set pagesize 0;
col merchant_id format a15;
col user_code1 format a6;
col merchant_id format a15;
col terminal_id format a8;
col TRANS_TYPE format 999;
col trace format 999999;


另有一问题
在对数据库其中一字段做截取操作后,如TRIM(substr(user_code1,1,8)),发现宽度并不为8,而是16,后面多8个空格。。郁闷中。

困扰多天了,求高手相助。
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
.千山.
基础和管理 17,379 成员 95,111 内容