Re: error handling using stored procedure
Date: Tue, 21 Apr 2009 20:21:12 +0000 (UTC)
On Tue, 21 Apr 2009 10:38:16 -0700, Jorge Reyes wrote:
> Hello everyone,
> Question: Is it possible to catch the error of duplicate key using an
> "insert into table select ...." inside of an stored procedure?
> Target: Execute my stored procedure each 15 minutes and insert all the
> non-duplicate records from a source table, and if its possible, the
> values of the duplicate records SUM with the existing values.
MERGE statement would be faster than a stored procedure for that purpose.
> 12:29:41.081 DBMS nmsnoc-db -- Error: PLS-00103: Encountered the
> "EXCEPTION" when expecting one of the following: 12:29:41.143 DBMS
> nmsnoc-db -- begin case declare end exit for goto if loop mod null
You have a syntax error, that's all.Received on Tue Apr 21 2009 - 15:21:12 CDT