![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Openmocha javascript server-side 0.9 | iBot | UNIX and Linux RSS News | 0 | 03-05-2008 03:50 AM |
| AWK how to strip from right hand side | angelolamberti | Shell Programming and Scripting | 5 | 01-17-2008 08:31 AM |
| Server side scripting | paladyn_2002 | Shell Programming and Scripting | 1 | 04-20-2004 12:04 PM |
| Having a Unix system installed side to side with Windows? | Pcslider | UNIX for Dummies Questions & Answers | 14 | 01-29-2002 06:21 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to print two sql query outputs side by side in excel
Hi,
I have to sql queries like select sno,sname from temptable; select deptno,dname from depttable; In excel i want to specify the column number to which my output should be displayed. please help me in this... thanks in advance... |
|
||||
|
How to print two sql query outputs side by side in excel
Hi Ranjan Thanks for your prompt reply....
i am using following script..to spool my output in to CSV. I want to print these two queries output side by side.Is it possible?? spool /apps/ssta/dic_feedfiels/PrimarySecondaryHANDSETsales$tdate.CSV select ' output1' from dual; select circle_id,distributor_code,count(*) primary_stock from table1 where item='HS' and sale_date between TRUNC(TRUNC(TRUNC(SYSDATE,'MONTH'),'MONTH')) and TRUNC(SYSDATE) group by circle,code; select null from dual; select null from dual; select null from dual; select null from dual; select 'output2' from dual; select circle_id,distributor_code,retailer_name,count(*) from table2 where sale_date between TRUNC(TRUNC(TRUNC(SYSDATE,'MONTH'),'MONTH')) and TRUNC(SYSDATE) group by circle,code,name; spool off EOF |
|
|||||
|
I am not sure on the below formatted one, but please try this out and let us know,
select A.* , B.* from (select circle_id,distributor_code,count(*) primary_stock from table1 where item='HS' and sale_date between TRUNC(TRUNC(TRUNC(SYSDATE,'MONTH'),'MONTH')) and TRUNC(SYSDATE) group by circle,code) A, (select circle_id,distributor_code,retailer_name,count(*) from table2 where sale_date between TRUNC(TRUNC(TRUNC(SYSDATE,'MONTH'),'MONTH')) and TRUNC(SYSDATE) group by circle,code,name) B ; |
|
|||||
|
hey prasee,
just let me know what xactly u need ??? i can optimized the query in order to return the o/p(no duplicate), in single excel sheet. but even i am not sure how you are going to export the 2 different queries o/p to a single excel sheet with different tabs ???? can u let me know, whether table1 and table2 are same???? |
|
||||
|
Hi ranjan,
table1 and table2 are different and we can not join those two tables. I want to put two outputs in same excel but as output1 is very long so i want to print output2 side to it. is there any other way to print in other sheets of excel. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|