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 done -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: <[EMAIL PROTECTED] 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).