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 |
shrinika
Messages: 306 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 #391313 is a reply to message #391308] |
Wed, 11 March 2009 13:58 |
|
Mahesh Rajendran
Messages: 10708 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?
[Updated on: Wed, 11 March 2009 14:04] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Thu Nov 21 10:34:19 CST 2024
|