Question : Dont reset autonumber

Hi there

I have 2 SQL tables one called vacancies and one called archive_vacancies.  I have a job running that when an advert "expires" it copies it to the archive_vacancies and then deletes the record in vacancies table.  The vacancy ID is set to identity=yes with an increment on 1.  However when the record is deleted from the "vacancies" table...the ID number seems to be reset?? How can I stop this?? So what ends up happening is there are sveral records in the archive_vacancies table that have the same ID number.  How can I stop the ID number "resetting"?!

Answer : Dont reset autonumber

then the only way to get 'another' 15 record in there is by
* either forceing it to that value (using IDENTITY INSERT)
* or by resetting the IDENTITY value using DBCC CHECKIDENT

I really don't see another way to get around this.  I guess you will need to dig into the code and start looking for one of these (or both)
Random Solutions  
 
programming4us programming4us