I would BULK the files into working tables. Given that the source files
will be relational I would store the Source PK FK values as attributes of
the records you import. This way you INSERT all the parents and they look
like this
NewKey OldKey
1 15
2 19
3 16
Etc etc
You can then match up the Ids in the working table with the old key
attribute and assign the new key attribute.
Make sense.
--
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Darian Miller" <darian-remove- (AT) darianmiller (DOT) com> wrote
Quote:
Given master table of xid (identity), fa,fb, etc... and detail table(s) of
xid, f1, f2...
What's the standard practice for performing a bulk import (from another
SQL
Server or file based) that handles keeping the master/detail id's in sync?
Obviously cannot keep the same ID's but do need to use the same id for the
master and child table rows...
Darian |