Script to return the output of a sql query in CSV Format
csv.sql
set linesize 2000
alter session set nls_date_format ='dd-mon-yyyy hh24:mi:ss';
set termout off feedback off colsep ,
--column buy_id clear
column log_file clear
--column load_status clear
column load_date clear
column load_comment clear
--column load_count clear
--column buy_id format 10
column log_file format a20
--column load_status format 5
column load_date format a20
column load_comment format a20
--column load_count format 10
clear buffer
prompt &1
prompt &2
spool &1
2 &2
/
--column buy_id clear
column log_file clear
--column load_status clear
column load_date clear
column load_comment clear
--column load_count clear
spool off
set colsep " "
set termout on feedback on
0 comments:
Post a Comment