Home » Infrastructure » Unix » storing multiple set of data into same excel file
storing multiple set of data into same excel file [message #391308] Wed, 11 March 2009 13:17 Go to next message
shrinika
Messages: 231
Registered: April 2008
Senior Member
Hello -

Is it possible to store two different set of data in the same excel file. One set of data should go into one tab.
Another set of data should go to another tab in the same excel.. Please let me know.

Here is the shell script i am using..

${ORACLE_HOME}/bin/sqlplus -s ${ORA_USER}/${ORA_PASSW}@${ORACLE_SID} << EOF > ${FTP_TO}/xyz.csv

set pages 0
set echo off
set ver off
set feed off
set linesize 600
SELECT
'Delivery #'||','||'REGION'||','||'Proforma Invoice'||','||'SONUM'||','||
'Export Docs print date'||','||'Export Docs print time'||','||'SLD2NAME'||','||'Frei
ght Fwdr (name)'||','||'Shipto Ctry'||','||'Shipping Point'||','||
'Extract Date' from dual;

select
"Delivery #"||','||
REGION||','||
"Proforma Invoice"||','||
SONUM||','||
"Export Docs print date"||','||
"Export Docs print time"||','||
SLD2NAME||','||
"Freight Fwdr (name)"||','||
"Shipto Ctry"||','||
"Shipping Point"||','||
"Extract Date"
FROM temp;

exit;
EOF


Now i wanted to run the another query and load the data into the same csv file(xyz.csv)... Is it possible?

Re: storing multiple set of data into same excel file [message #391310 is a reply to message #391308] Wed, 11 March 2009 13:27 Go to previous messageGo to next message
Michel Cadot
Messages: 59147
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Not a in CSV file.

Regards
Michel
Re: storing multiple set of data into same excel file [message #391313 is a reply to message #391308] Wed, 11 March 2009 13:58 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10626
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Generate separate spooled outputs and join them later.
A simple unix job.
Kaapi:ora magvivek$ cat f1
ename,sal,job
ename,sal,job
ename,sal,job
Kaapi:ora magvivek$ cat f2
dname,loc
dname,loc
dname,loc
dname,loc
dname,loc
Kaapi:ora magvivek$ pr -m -t -s f1 f2 
ename,sal,job	dname,loc
ename,sal,job	dname,loc
ename,sal,job	dname,loc
	dname,loc
	dname,loc
Kaapi:ora magvivek$ pr -m -t -s f1 f2 > f3.xls

Is this the output you are looking into?
./fa/5884/0/
  • Attachment: Picture 1.png
    (Size: 54.12KB, Downloaded 259 times)

[Updated on: Wed, 11 March 2009 14:04]

Report message to a moderator

Re: storing multiple set of data into same excel file [message #391315 is a reply to message #391313] Wed, 11 March 2009 14:41 Go to previous message
shrinika
Messages: 231
Registered: April 2008
Senior Member
Thank you...
Previous Topic: using dos2unix on multiple files (merged)
Next Topic: Call Shell script from SQL?
Goto Forum:
  


Current Time: Sat Sep 20 23:53:08 CDT 2014

Total time taken to generate the page: 0.07742 seconds