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 |
thunderchicken
Starting Member
2 Posts |
Posted - 2006-05-04 : 11:13:47
|
Hello,Basically I have a proprietary database that I'm trying to import into a new relational SQL database, and this database will be copied to another database.The flat file has primary keys and so forth set up, and the four files use that key to relate the data.I'm confused on the best way to import this based on the following problems1. The proprietary databases' PK may change2. Anytime a new record or one is modified, I'll need to change the modification date (column)3. I can not rely on the proprietary's PK, since it's not 100% sure it will change.My problem is, how do I retain my PK, and update it through DTS, so I don't have to rely on their PK? |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-04 : 21:53:40
|
add a separate column and use that as your own PK?or am i oversimplifying again?--------------------keeping it simple... |
 |
|
thunderchicken
Starting Member
2 Posts |
Posted - 2006-05-05 : 06:56:23
|
Right, seperate column, but with the new data, how do you determine what to update? |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-05 : 09:55:20
|
if the pk from the source table may change then you need a reference field, unless before changing the pk on the source table, you can capture the old PK and do the update on the destination tablesuch as coming from a trigger--------------------keeping it simple... |
 |
|
|
|
|
|
|