Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with trigger/sqlca.sqlerrd[2]
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
![]() |
![]() |