Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to update a new sql 2008 r2  database from an older sql 2008 r2 indexed database

Posted on 2013-06-18
2
Medium Priority
?
261 Views
Last Modified: 2013-06-19
I have a program that has used the same sql 2008 r2 database for some years. It is a fairly simple layout than uses one of its columns as (is indentity) (autonumber by 10). Each time a new record is added it produce a new number. This is then used by other tables as a relational key.

I have made a major update to the program and require the old data to be imported into the new database table. The problem is that if I insert the old data into the new one the index increment will be consecutive. This problem is that in the past occasionally a record will be deleted so the numbers won't be consecutive.

How do I move the old table to the new database and preserve in indexed number in the old. The new table will still need to be indexed.

Is there a way to copy the old table to the new and preserve the indexed number?
0
Comment
Question by:milkwood
2 Comments
 
LVL 10

Accepted Solution

by:
Matt Bowler earned 2000 total points
ID: 39258641
0
 

Author Closing Comment

by:milkwood
ID: 39258747
Just the job
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question