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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with trigger/sqlca.sqlerrd[2]

Re: Problem with trigger/sqlca.sqlerrd[2]

From: Herod <herodt_at_gmail.com>
Date: 9 Mar 2006 17:51:46 -0800
Message-ID: <1141955506.308185.215510@j33g2000cwa.googlegroups.com>


You said for "one column" your trigger code is for all the columns.

You said you need to read the value for the SERIAL column. but your trigger is SERIAL_CO

I will assume those are the same.

You can use <sequence_name>.currval as long as you are in the same transaction.
But that will only bring back the value for the LAST record you inserted, so if you are doing hundreds of records, your out of luck that way.

You can set the sequence in the C program, then insert it into the table, not needing the trigger at all. But that isn't the greatest idea in the world.

You mention sqlca.sqlerrd[2] I have no idea what that is. Received on Thu Mar 09 2006 - 19:51:46 CST

Original text of this message

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