Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Exclamation Unanswered: Incrementing A Set Number

    I am revising a database with a log number field as its primary key. The numbers were incrementing, but some numbers were skipped on purpose. The last number on the log is 927.

    Is it possible to make the numbers increment by 1 from here on out without changing the whole table? I wish I can use the autonumber selection, but how can i tell it to start from 927.

    Please help with this newbie question.....

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    (A2K answer): can't!

    once there is data in a field you can't set it to autonumber
    you can't define the "seed" of autonumber.

    you can create a new field = autonumber and A will backfill starting with 1 which doesn't help you

    ...don't make autonumbers "meaningful" and then there is no issue - just let them handle their role of providing an automatic guaranteed-unique key to a table.

    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Chicago, IL
    Try this... Copy the current table, but only the structure and not the data. Edit the new table and make the field an autonumber field. Then append all of the rows from the existing table to the new table. That should give you what you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts