--set colsep , set feedback off set heading off set newp none set pagesize 0 set linesize 200 set trimout on set termout off SPOOL dcs_file_record.csv --select '"' ||BLOOMBERGTICKER || '","' || BLOOMBERGUNIQUEID || '","' || CALLEXECUTIONDATE || '"' from dcs_reserved_markit_instrument where check_time > trunc(sysdate)-30; --select * from dcs_reserved_markit_instrument where check_time > trunc(sysdate)-10; --select '' ||DCS_ID || ',' || BATCH_ID || ',' || HOST || ',' || PATH || ',' || FILE_NAME || ',' || FILE_TIME|| ',' || DCS_FLAG || ',' || CREATE_TIME || '' from dcs_file_record; select '' ||DCS_ID || ',' || BATCH_ID || ',' || HOST || ',' || PATH || ',' || FILE_NAME || ',' || FILE_TIME|| ',' || DCS_FLAG || ',' || to_char(CREATE_TIME,'yyyy-mm-dd hh24:mi:ss') || '' from dcs_file_record ; SPOOL off exit