sql formatting quest [message #357929] |
Fri, 07 November 2008 05:18 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
diamond
Messages: 26 Registered: July 2008
|
Junior Member |
|
|
hi,
how can i set the error display in my spool file off?
esp the ' no rows selected' message
also i dont want to display the output on the screen while i run my script.. it should be there only in spool file..
thanks in advance.
|
|
|
Re: sql formatting quest [message #357934 is a reply to message #357929] |
Fri, 07 November 2008 05:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shobanasree
Messages: 9 Registered: November 2008 Location: Bangalore
|
Junior Member |
|
|
Hi diamond,
Use the below set statements:
set feedback off
set echo off
set head off
set pagesize 24
set linesize 100
set newpage NONE
set trimspool on
select <>;
spool off;
|
|
|
Re: sql formatting quest [message #357937 is a reply to message #357934] |
Fri, 07 November 2008 05:41 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
diamond
Messages: 26 Registered: July 2008
|
Junior Member |
|
|
hi,
still it shows me the error.. and when i run the query. the output is displayed on the screen.. i jus want the out put to run silently n display the output in the spool file only
ex:
CPUJul2007 CPUApr2007
sys.registry$history,v$instance,v$database
*
in the spool file as well in terminal
|
|
|
|
Re: sql formatting quest [message #357945 is a reply to message #357929] |
Fri, 07 November 2008 06:00 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
diamond
Messages: 26 Registered: July 2008
|
Junior Member |
|
|
still i am getting the same prob..
sys.registry$history,v$instance,v$database
*
ERROR at line 7:
ORA-00942: table or view does not exist
is the error i want to suppress..
also even i set the termout off..
the output is been displayed on the terminal..
please guide
|
|
|
|
|
|
Re: sql formatting quest [message #357955 is a reply to message #357951] |
Fri, 07 November 2008 06:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
diamond
Messages: 26 Registered: July 2008
|
Junior Member |
|
|
i did not mean in the sense that there are lot of doc in that i can read through.. i meant in the way that.. there i could c a site wherin i submit my query n i could c any errors..
dont u think that is good for a new sql developer..
I found it as an amazing knowlegde source..
may be look at it as diffrent views..
nevermind..
can u giv an answer to my query.. if u really don want to argue on something else???
|
|
|
|
|
Re: sql formatting quest [message #358037 is a reply to message #357971] |
Fri, 07 November 2008 19:42 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
You cannot trap the errors in SQL*Plus and customise the messages that they display.
To trap and handle messages, you need to encapsulate the SQL in another language like PL/SQL, Java, Perl, Pro*C, whatever. But when you do that you do not get the "simple" display formatting features of SQL*Plus.
Ross Leishman
|
|
|