RE: How Can I get A sequence Current Value in PROC

2001-11-26 Thread Lowes, Harry (NESL-IT)
Afternoon, I had always assumed that this was because, before you get the next number for a sequence using NEXTVAL, there ISN'T a current value. There is only the last number generated, visible in the dictionary. NEXTVAL initialises the current value, setting it to (LAST_NUMBER + INCREMENT_BY). T

Re: How Can I get A sequence Current Value in PROC

2001-11-26 Thread Stefan Jahnke
Hi Yes. Try .CURRVAL. Once you've retrieved a value, you can refer to this value as often as you want to with CURRVAL. Regards, Stefan ehsan sinavalda schrieb: > > Hi > > when writing a program PROC .NEXTVAL > points to the next value of a sequence, is there > anything like .SOMETHING that re

RE: How Can I get A sequence Current Value in PROC

2001-11-26 Thread G . Plivna
Subject: RE: How Can I get A sequence Current Value in PROC Sent by:

RE: How Can I get A sequence Current Value in PROC

2001-11-26 Thread Iulian . ILIES
Or I think you can query the dictionary SELECT last_number INTO FROM user_sequences WHERE sequence_name = UPPER() I don't know why it's necessary to use nextval, but they state this in the documentation. Iulian -Original Message- Sent: Monday, November 26, 200

Re: How Can I get A sequence Current Value in PROC

2001-11-26 Thread Igor Neyman
Look at 'last_number' in DBA_SEQUENCES view. User should be granted SELECT permissions. Igor Neyman, OCP DBA [EMAIL PROTECTED] - Original Message - To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]> Sent: Monday, November 26, 2001 7:50 AM > Hi > > when writing a progra

Re: How Can I get A sequence Current Value in PROC

2001-11-26 Thread Bill Buchan
Yes, .CURRVAL Note that this provides the current value for the session: i.e. the value that was last returned by NEXTVAL within that session. Therefore: 1. NEXTVAL must have been called at least once before in the session to define CURRVAL. 2. Even if NEXTVAL is called for the sequence in a

RE: How Can I get A sequence Current Value in PROC

2001-11-26 Thread FOX, Simon
.CURRVAL Only works after .NEXTVAL Simon Fox -Original Message- Sent: 26 November 2001 12:50 To: Multiple recipients of list ORACLE-L Hi when writing a program PROC .NEXTVAL points to the next value of a sequence, is there anything like .SOMETHING that returns current value of sequ

RE: How Can I get A sequence Current Value in PROC

2001-11-26 Thread Cale, Rick T (Richard)
Does anyone know why Oracle forces you to use NEXTVAL before doing CURRVAL. I would think sometimes you would want to use CURRVAL without incrementing sequence first. Thanks Rick -Original Message- Sent: Monday, November 26, 2001 8:50 AM To: Multiple recipients of list ORACLE-L You can

RE: How Can I get A sequence Current Value in PROC

2001-11-26 Thread Iulian . ILIES
You can use another pseducolumn CURRVAL but you must use at least once per session the NEXTVAL before using the CURRVAL or else you would get the ORA-08002 error. ... SELECT .CURRVAL INTO FROM dual; ... HTH Iulian -Original Message- Sent: Monday, November 26, 2001 2:50 PM To: Multiple

How Can I get A sequence Current Value in PROC

2001-11-26 Thread ehsan sinavalda
Hi when writing a program PROC .NEXTVAL points to the next value of a sequence, is there anything like .SOMETHING that returns current value of sequence. Thanks E. __ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/