how to use batch script to export data from oracle into excel file with column names -


  1. 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; 
  2. 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 
  3. 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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -