简体   繁体   中英

Spooling data to CSV truncates

I am using the below script to output data to a csv file:

set heading off
set linesize 10000
set pagesize 0
set echo off
set verify off

spool D:\OVERNIGHT\TEMP_FILES\PFRA_DETAIL_VIXEN_OUTPUT.txt


SELECT
TRIM(T4.S_ORG_ID)||','||
TRIM(T4.NAME)||','||
TRIM(T3.CREATION_TIME)||','||
TRIM(T5.X_HOUSE_NUMBER)||','||
TRIM(T5.X_FLAT_NUMBER)||','||
TRIM(T5.ADDRESS)||','||
TRIM(T5.CITY)||','||
TRIM(T5.ZIPCODE)||','||
TRIM(T3.NOTES)
FROM TABLE_CASE T1
INNER JOIN TABLE_QUEUE T2 ON T1.CASE_CURRQ2QUEUE = T2.OBJID
INNER JOIN TABLE_PHONE_LOG T3 ON T1.OBJID = T3.CASE_PHONE2CASE
INNER JOIN TABLE_BUS_ORG T4 ON T1.X_CASE2X_BUS_ORG = T4.OBJID
INNER JOIN TABLE_ADDRESS T5 ON T1.CASE2ADDRESS = T5.OBJID
WHERE case_currq2queue IN(422);

/


spool off;
exit;

However the data is being truncated to 80 characters. The t3.notes field is in CLOB format. Does anyone know how I can spool this out to csv? I only have access to SQL*Plus.

Thanks in advance, Steve

尝试SET LONG 10000(或任何您需要的CLOB)

看一下SET LINESIZE SQL * Plus命令。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM