On Aug 9, 2004, at 7:14 PM, Sean Davis wrote:
> I'm a novice, too, but why not look up the value in the sequence and
> increment it before doing any inserting? If you are doing all the
> inserts
> at the same time (more or less), then you can just use this value in
> the
> insert into both tables. Put all of this inside one transaction.
Actually, I don't even think it has to be inside a transaction. Beyond
being transaction safe, currval is session safe (correcting something I
said in an earlier post). As long as you don't put another insert or
otherwise manipulate the sequence in the same session, you can trust
currval
Michael Glaesemann
grzm myrealbox com