SQLTeam.com | Weblogs | Forums

Order of Operation for migrating? or manipulate data in table

sql2008

#1

Qs: I have:
The tbl_CaseRecords that has all existing and newly entered case records.
When two cases get merged, the newly merged record also get a new case record ID.
The tbl_CaseCodes has a 'merge' code ID of 25.
The tbl_CaseLocation saves the new caseID and mergeID of 25. What to do is:

  1. New request to start all merged records with ID identity of 500 number series.
  2. Do I migrate? redo ID column for tbl_CaseLocation to start with 500 number series?
  3. Or am I migrating data into a new table, let's say tbl_MergedCaseRecords table.

What is best order here and best thing to do? I can do query to start mergeID with 500 and do a stored_proc to join tables to get desired results. Do I do 1 big stored procedure to do all? Any help is appreciated. So much thank you in advance!