SQLPLUS Report with multiple queries [message #259171] |
Tue, 14 August 2007 10:02 |
lykmyk
Messages: 9 Registered: March 2007
|
Junior Member |
|
|
Hello Experts:
I am writing a SQLPlus report that will have two seperate queries. The first query is a summary while the second query contains detail information. Example:
SPOOL rep.txt
select SUM(a.col1) FROM test_tab;
select a.col1,a.col2,a.col3 FROM test_tab;
SPOOL OFF
After the report runs, the second query starts on a new page.
Here are my questions:
#1) How can i get the second query to start on the same page immediately after the first query.
#2) I would like to give each query a "sub_title". I am using REPHEADER now, but i suspect that may be forcing the second query to start on a new page.
Thanks for your help.
|
|
|
|
Re: SQLPLUS Report with multiple queries [message #259225 is a reply to message #259207] |
Tue, 14 August 2007 14:51 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
Try using PROMPT between the 2 queries to print extra text. Of course it won't repeat per page break. The SQLplus example reports show most of the formatting possibilities. An obsecure way to really customize report layout is to populate a pl/sql table (or table) from pl/sql with the exact formatted text per line that you want - then just select the contents of that for the final result.
|
|
|