Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Newbie question

Status
Not open for further replies.

dnfrantum

Programmer
Oct 23, 2001
175
US
I have the following query, but two things I can't seem to figure out is how to suppress the BOF from printing at the top of each 'SELECT' statement and how to compute the record count to print on line two and how to justify everything to the left (trimming all of the preceding white space. Here is my query:

Code:
SET NEWPAGE NONE
SET HEADING OFF
SPOOL C:\DF_KAPLAN_TEST.txt;
TTITLE LEFT 'BOF'
BREAK ON TODAY
COLUMN TODAY NEW_VALUE MYDATE 
SELECT TO_CHAR(SYSDATE,'MM/DD/YY') today FROM DUAL;
CLEAR BREAKS
BTITLE LEFT 'EOF'
SELECT
T0.R_OBJECT_ID||'|'|| T0.OBJECT_NAME||'|'||CASE WHEN (T0.R_VERSION >= 1.0) THEN T0.R_VERSION ELSE '' END||'|'|| CASE WHEN (T0.R_VERSION < 1.0) THEN T0.R_VERSION ELSE '' END
FROM 
QM_Document_Base T0
WHERE
T0.R_ISSYSTEM_COPY = 0 AND I_LATEST_FLAG = 1; 
SPOOL OFF;

Thanks in advance,
Donald
 
Are you trying to format your output using sql plus?
If you are, then how about setting trimspool on?

Can you post create table statements, insert statements for sample data and an example of the desired output format?

That way we could all work together on it.

Regards

T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top