We are looking to auto increment a field ie 1-10 and if one row is deleted we need the fields to renumber them selfs and when the next row is inserted we need to continue from the next higest number..
We are using the IDENTITY property in Microsoft SQL Server 2000 to auto-increment a field in our database. For example, if you have 10 rows of data this column would have them numbered 1 thru 10. The problem we are having is when a row is deleted the other rows dont renumber and SQL continues from the last number it saved.
Here&'s what we are looking for:
If you delete one of the rows (for example row 7)…we would like the auto-increment to update the other fields so they are numbered sequentially again (8 moves to the 7 spot, 9 to the 8 spot, and 10 to the 9 spot – so the rows are numbered 1 thru 9).
Right now when a row is deleted, it does not update the field…just moves on to the next number.
Does anyone have a solution to this problem?
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
## Platform
Windows