Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
krainov
Yak Posting Veteran
57 Posts |
Posted - 2012-07-24 : 04:42:19
|
Hi there!Due to the changes in application architechture I need to write a SQL procedure to import old data to the new DB file.Here is the old tables view: And the new one: What is the right way to do that? |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2012-07-24 : 06:10:01
|
First thing is to map your columns between old and new, so from the above, MATERIAL_ID would map to ID in Material, SHOW would map to IsVisible etc..From there, it is a case of bulking out the other columns with values (they may be defualt or condition based, you need to ask the architect or the BA questions to know what to put into the new fields).Once you have found all this out, write a SELECT query that gets the data out of the old system in the new systems format, then go back to your BA and ask them if it looks correct, then write the INSERT. |
 |
|
|
|
|