HP Users:
Happy Thanksgiving to all of our friends in the US. The rest, well, Happy Wednesday!
Now for my question: and I know that this is trivial to anyone who writes this stuff on a semi-regular basis....I want to suppress the default headings that print in my sqlplus report.
Environment:
Oracle 9.2.0.1.0
Windows 2000
PL/SQL (sqlplus)
code snippett:
-- * PROGRAMMER : acks to Krishna Kakatur (by JMP0) *
-- * *
-- *********************************************************
col object_type heading " "
col owner heading " "
col object_name heading " "
set pagesize 60;
set feedback off;
set echo off;
set termout off;
spool report_invalid.txt;
break on object_type skip 2
ttitle center 'Objects that have an "Invalid" Status in dba_objects' skip 2
SELECT distinct decode(object_type, 'PACKAGE BODY','PACKAGE', object_type)||
' '||owner||'.'||object_name
FROM dba_objects WHERE status='INVALID'
AND object_type
IN ('PACKAGE','PACKAGE BODY','VIEW',
'FUNCTION','PROCEDURE','TRIGGER')
group by object_type, owner, object_name;
/
spool off
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Output
Objects that have an "Invalid" Status in dba_objects
DECODE(OBJECT_TYPE,'PACKAGEBODY','PACKAGE',OBJECT_TYPE)||''||OWNER||'.'||OBJECT_
--------------------------------------------------------------------------------
TRIGGER ASR.BIU_TBLACCTADJUSTMENTS
TRIGGER ASR.BIU_TBLACCTADJUSTMENTSABST
TRIGGER ASR.BIU_TBLACCTCONTACTS
TRIGGER ASR.BIU_TBLACCTOG
TRIGGER ASR.BIU_TBLACCTOGEQUIP
TRIGGER ASR.BIU_TBLACCTOGPROD
TRIGGER ASR.BIU_TBLACCTOGWELLS
TRIGGER ASR.BIU_TBLACCTPP
TRIGGER ASR.BIU_TBLACCTPPCONTACTS
TRIGGER ASR.BIU_TBLACCTPPDETAIL
TRIGGER ASR.BIU_TBLACCTPPFARM
TRIGGER ASR.BIU_TBLACCTPPFREEPORT
I don't want to see the
"DECODE(OBJECT_TYPE,'PACKAGEBODY','PACKAGE',OBJECT_TYPE)||''||OWNER||'.'||OBJECT_"
as it is irrelevant.
Best
John M Penney
Systems Programmer
Production Services
Information Services Department
Pierce County
Tacoma, WA
253-798-6215
253-798-6680 Fax
[log in to unmask]
www.co.pierce.wa.us
The opinions expressed herein reflect those of the sender.
They do not necessarily reflect the opinions of Pierce County
unless specifically stated otherwise.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|