Progress
Language Reference
CURRENT-VALUE Statement
Resets the current integer value of a sequence defined in the Data Dictionary.
SYNTAX
sequence
An identifier that specifies the name of a sequence defined in the Data Dictionary.
logical-dbname
An identifier that specifies the logical name of the database in which the sequence is defined. The database must be connected. You can omit this parameter if the sequence name is unambiguous. If more than one connected database has a sequence with given name, then you must supply logical-dbname.
expression
An integer expression assigned as the current value of the specified sequence. If expression is outside the boundary set by the initial value (at one end) and the lower limit or upper limit (at the other end) for the sequence, Progress returns an error, and the sequence value remains unchanged.
EXAMPLEThe following example resets the current value of the next-cust-num sequence to the cust-num value of the last customer record if that is a valid value for the sequence.
NOTES
- The user must have CAN-WRITE privileges on the _Sequence table to use the CURRENT-VALUE statement.
- The value of a sequence set by the CURRENT-VALUE statement persists in the database until the next CURRENT-VALUE statement or NEXT-VALUE function is invoked for the sequence, or until the sequence is deleted from the database.
- You cannot set a sequence to the unknown value (?).
SEE ALSO
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |