Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Sv: PL/SQL HELP NEEDED!!!!
seq.currval is per session as Tom says, not per username.
Each time a user logs on, as session is created and you need to use nextval in this session, before you can use currval.
Karsten Weikop
Make IT
Denmark
Barney Gumble <duff.drinker_at_cornerpub.FUDD-SUX> skrev i en
nyhedsmeddelelse:3768AACB.5FC92CA0_at_cornerpub.FUDD-SUX...
> So what you are saying, I could make proc like:
>
> Procedure blabla (xxxx NUMBER) AS
>
> BEGIN
> INSERT INTO MyTable (var1, var2)
> VALUES (seq.NextVal, xxxx);
>
> INSERT INTO NewTable (var1, var2)
> VALUES (seq.CurrVal, xxxx);
> ... and so on...
> COMMIT;
> END;
>
> What if there are several users with the same logon ID?
>
> BG :O)
>
> Thomas Kyte wrote:
>
> > currval and nextval are SESSION specific. When you get a nextval --
currval
> > will also return YOUR currval -- never anyone elses. currval would be
utterly
> > useless if it returned anything other then your last NEXTVAL...
>
> --
> "Your infatuation is based on a physical attraction.
> Talk to the woman and you'll realize you have nothing
> in common. >>>BURP!!!<<<"
> -----------------------------------------------------
> Replace ".FUDD-SUX" with ".com" to reply.
>
>
Received on Thu Jun 17 1999 - 03:46:06 CDT