Shell SQLPLUS两次打印CLOB数据

时间:2018-05-03 20:02:47

标签: linux oracle sqlplus ksh

我在我的ksh shell脚本文件中有以下代码,当我运行这个时,我在文件中打印两次输出。这里FILE_DATA的类型为CLOB

sqlplus -s ${uidpwd} > ${DATA_FILE_NAME} << EOF 
set head off 
SET pagesize 0
SET LINESIZE 32767
SET LONGCHUNKSIZE 32767
SET LONG 320000000
SET RECSEP OFF
set SERVEROUTPUT off 
SET ECHO off
SET TRIMOUT ON
SET TRIMSPOOL ON
set termout off

set feedback off verify off heading off newpage 0
whenever OSERROR EXIT 9
whenever SQLERROR EXIT sql.SQLCODE
SELECT FILE_DATA FROM FILES WHERE ID='208';
/
exit;
EOF

数据:

"Client_id,Client_id_type,Client_Segment
1,LOCAL_ID,Individual"

0 个答案:

没有答案