Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Plus errors... how to hide?
If the data is supposed to be strictly numeric, you can intercept the bad data prior to running the sql.
X=''
while [ -z "$X" ]; do
echo "" echo "Enter a number or Q to quit" read X if [ "$X" = "Q" ]; then echo "Exiting ..." exit 0 fi if [ -z "$X" ]; then echo "" echo "That was a blank entry. Try again." echo "" continue fi if [ -n "`echo $X | sed -n '/[^0-9]/p'`" ]; then echo "" echo "You entered at least one non-numeric character." echo "You entered ->${X}<-" echo "Try again." echo "" X="" continue fi
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: <Stephen.Lee_at_DTAG.Com
INET: Stephen.Lee_at_DTAG.Com
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: ListGuru_at_fatcity.com (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). Received on Thu Nov 06 2003 - 17:14:25 CST
![]() |
![]() |