Posted on 2004-04-13
PB Version 8 using 8 oracle drivers
Database is Oracle 9i
I have a table I want to add a new row into. The table has a primary key which is being created using a sequence. The sequence is generated via a trigger.
I need to be able to get the new primary key from the new row to use in children rows.
I have heard of an oracle feature called RETURNING INTO. It works something like this:
Insert Into schema.table
Values (:bind1, :bind2)
Returning col1 Into :variable
if sqlca.sqlcode = -1 then
This above statement executes fine but I can't seem to capture the col1 (aka primary key column) into a variable for later use.