Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread generate always, seed not recognized
Wed, Sep 28 2016 10:22 PMPermanent Link

Gregory T Swain

Zucchetti North America LLC

This seems to be similar to some other problems reported recently

Create a table with an identity element, generated always
Alter the table to turn off generation.
Import records with nonzero values in the identity column. In particular, the smallest value is > 100
find the max identity value, add 10.
Alter the table to turn on generation, always, with new seed.
All looks good.

Insert a record. This is given an identity value of 2. In other words, the seed is ignored.

Doesn't matter much in itself, except I am expecting a collision when the new id series meets the records already present.

Bill Meakin.
Thu, Sep 29 2016 5:29 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Gregory


Two things - first why not use the "by default" rather than the "always" setting for the autoinc

Secondly - how are you setting the seed? Its nota as simple as altering the column - you need to use RESTART WITH.


Roy Lambert
Thu, Sep 29 2016 9:20 PMPermanent Link

Gregory T Swain

Zucchetti North America LLC

Roy Lambert wrote:

Gregory

Two things - first why not use the "by default" rather than the "always" setting for the autoinc

Secondly - how are you setting the seed? Its nota as simple as altering the column - you need to use RESTART WITH.

Roy Lambert

That worked, eventually. Thanks.
Image