i have a sql server 2000 database with a table that includes an identity primary key field. it also includes an int field called "referenceCode" . the "referenceCode" value is set by the application that uses the database and is incremented for new records under certain conditions.
due to a design defect in the application, i've discovered that many of the "referenceCode" values are incorrect and need to be reincremented. for example, a subset of records in the table might have values of:
5010
5011
5012
5013
i would like to pick a new starting number and have that subset of records reincremented. for exmaple, start with 6000 to end up with:
6000
6001
6002
6003
any suggestions on how to accomplish that using an UPDATE statement?
thanks,
glenn
due to a design defect in the application, i've discovered that many of the "referenceCode" values are incorrect and need to be reincremented. for example, a subset of records in the table might have values of:
5010
5011
5012
5013
i would like to pick a new starting number and have that subset of records reincremented. for exmaple, start with 6000 to end up with:
6000
6001
6002
6003
any suggestions on how to accomplish that using an UPDATE statement?
thanks,
glenn