most appropriate way is to use a
begin
..
exception
when invalid_number then
dbms_output.put_line('Sorry, a batch number must be numeric, please try again.');
when ...
..
end
Raj
--------------------------------------------------------------------------------
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !
-----Original Message-----
Sent: Thursday, November 06, 2003 4:54 PM
To: Multiple recipients of list ORACLE-L
Saira,
How about use the same method as suggested in another thread, i.e. pipe and
remove unwanted text? In your case
whatever comes in | sed -n '/^BEGIN/,/^ORA-06512: at line/!p'
Yong Huang
--- Saira Somani-Mendelin <[EMAIL PROTECTED]> wrote:
> List,
>
> I have a shell script that executes a sql*plus script (which executes a
> procedure) based on user input.
>
> But what if the user inputs an invalid datatype? The exception section
> handles the error and displays a user-friendly message but I still get
> an error stack. I want to hide this from the user. How can I do this? I
> have set feedback and echo options off. See output below:
>
> PO Reconciliation Batch Release
> ================================
>
> Enter batch number to be released:
> yrugis
> You have entered an invalid number! Exiting program...
> **[I want to suppress the errors below]**
> BEGIN RELEASE_PO_B_H('yrugis'); END;
>
> *
> ERROR at line 1:
> ORA-01722: invalid number
> ORA-06512: at "TRAIN65D.RELEASE_PO_B_H", line 16
> ORA-06512: at line 1
>
> Thanks,
> Saira
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Yong Huang
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
**************************************************************************************
This e-mail message is confidential, intended only for the named recipient(s) above
and may contain information that is privileged, attorney work product or exempt from
disclosure under applicable law. If you have received this message in error, or are
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000
and delete this e-mail message from your computer, Thank you.
**************************************************************************************5
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jamadagni, Rajendra
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).