Home » SQL & PL/SQL » Client Tools » sql formatting quest
sql formatting quest [message #357929] Fri, 07 November 2008 05:18 Go to next message
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 messageGo to next message
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 messageGo to next message
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 #357944 is a reply to message #357937] Fri, 07 November 2008 05:53 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
set termout off

Regards
Michel
Re: sql formatting quest [message #357945 is a reply to message #357929] Fri, 07 November 2008 06:00 Go to previous messageGo to next message
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 #357947 is a reply to message #357945] Fri, 07 November 2008 06:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is not if you "set termout off" and execute it from a script.
If this is not the case post your SQL*Plus session.
Before read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.

Regards
Michel
Re: sql formatting quest [message #357949 is a reply to message #357929] Fri, 07 November 2008 06:19 Go to previous messageGo to next message
diamond
Messages: 26
Registered: July 2008
Junior Member
thanks for the reply.. it is a great knowledge source..


but i am not able to supress any ORA- errors..
how do i supress those?
Re: sql formatting quest [message #357951 is a reply to message #357949] Fri, 07 November 2008 06:35 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
diamond wrote on Fri, 07 November 2008 13:19
it is a great knowledge source

What exactly do you call "a great knowledge source"? SQL Formatter or this Forum's guidelines?

To rephrase it: I bet you didn't even click on any of these links (nor read carefully what Michel has said).
Re: sql formatting quest [message #357955 is a reply to message #357951] Fri, 07 November 2008 06:48 Go to previous messageGo to next message
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 #357959 is a reply to message #357955] Fri, 07 November 2008 07:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
my query n i could c any errors..

What does this mean?
Once again read forum guide and don't use IM/SMS speak.

I gave you the answer just try it and report as requested.

Regards
Michel
Re: sql formatting quest [message #357971 is a reply to message #357959] Fri, 07 November 2008 07:54 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
You don't want so see any error messages?

OK, when you "look at it as diffrent views":

Close your eyes while running the job. Very Happy

Re: sql formatting quest [message #358037 is a reply to message #357971] Fri, 07 November 2008 19:42 Go to previous message
rleishman
Messages: 3724
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
Previous Topic: Toad and iSeries Navigator Question
Next Topic: which software?
Goto Forum:
  


Current Time: Wed Dec 07 10:37:50 CST 2016

Total time taken to generate the page: 0.10719 seconds