ReevaluateTableSequence() |
Evaluates a sequence and will update the current value if it is incorrect. For example if you have inserted a row in your table (AGENCY) that contains a value(20) in the primary key field (ID) that is higher than the current value(15) of the sequence (SEQ_AGENCY), you will get a unique key error on SEQ_AGENCY when NEXT VALUE results in 20 because it was inserted without considering the sequence. This method will set the nextvalue of the sequence to max(primaryKey) +1. If you do not provide a tablename all sequences in the application context will be checked. So for example when you use this action in a definer instance, all definer sequences will be checked. Syntax ReevaluateTableSequence ( tablename ) ReevaluateTableSequence ( )
Example ReevaluateTableSequence ( 'AGENCY' ) |