Reset sequence

syddie

New Member
How does one reset a database sequence?
I have cleaned data out of a database using proutil truncate and would like to set all sequences back to 0.

regards
Ken
 
you can assign the sequences current values with current-value statement or dynamic-current-value statement.

you can do this dynamically like this:

Code:
for each _sequence:
    if  _sequence._seq-min > 0 then
    assign dynamic-current-value(_sequence._seq-name,ldbname(1)) = _sequence._seq-min.
    else assign dynamic-current-value(_sequence._seq-name,ldbname(1)) = 0.
end.

Casper.
 
Back
Top