how to use batch script to export data from oracle into excel file with column names -
this bat script:
set linesize 4000 pagesize 0 colsep ',' set heading off feedback off verify off trimspool on trimout on spool &1 select * siebel.s_contact; spool off exit;
then try run below command. can generate
excel
file data column names missing.c:\users\jy70606\documents\script>sqlplus -s geneos/password@database @c:\users\jy 70606\documents\script\daily.sql daily.csv
my question is, how make columns available in
excel
?
your bat script contains following command remove columns
set heading off
you need switch on
set heading on
reference: https://docs.oracle.com/cd/b19306_01/server.102/b14357/ch12040.htm#i2699001
Comments
Post a Comment