Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Catching errors on inserts

RE: Catching errors on inserts

From: Karniotis, Stephen <Stephen_Karniotis_at_compuware.com>
Date: Fri, 16 Aug 2002 12:03:32 -0800
Message-ID: <F001.004B8075.20020816120332@fatcity.com>


Bob:

  You can use WHEVER conditions within your SQL*Plus script, however, it stops when an error is received. You could put into an anonymous pl/sql block and use exception handling. Use this format:

BEGIN

     PROCEDURE XXX  is
     BEGIN
	INSERT STATEMENT with variables for all values

     EXCEPTION HANDLER
     END;

     Call procedure with values for insert

END Thank You

Stephen P. Karniotis
Product Architect
Compuware Corporation

Direct:	(248) 865-4350
Mobile:	(248) 408-2918
Email:	Stephen.Karniotis_at_Compuware.com
Web:	www.compuware.com

 -----Original Message-----
Sent:	Friday, August 16, 2002 3:48 PM
To:	Multiple recipients of list ORACLE-L
Subject:	Catching errors on inserts

Oracle Water Walkers!

        I have a very large insert script that may contain data that is larger than the column, I need to be able to identify rows that fails with

"Value too large for column"

Im doing 10k inserts via insert into table (val1,val2,...)

Is there a way to do this (trap bad rows) in SQL Plus? I don't see how but I figured I ask. The collective intelligence here is greater that I ...

Many thanks

You people on fatcity are awesome!!
bob

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Bob Metelsky
  INET: bmetelsky_at_cps92.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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).

The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Karniotis, Stephen
  INET: Stephen_Karniotis_at_compuware.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Fri Aug 16 2002 - 15:03:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US