Ok so if I read you correctly you want to import Parent and child rows from
databases into a centralised database but maintain the link from the source
databases in the destination.
No problem.
The way I do this is to have a SourceIdentifier attribute on the
destination. This identifies the row from the source.
So if the Source has an ID attribute that is used to link it to the children
then I would have a destination of something like
CREATE TABLE Dest (id int.............., SourceIdentifier int)
You may need more than one attribute to identify the source system but it
works.
Now what you do is you load the parents first.
You then load the children by looking up the Parent id in the Source and
matching with the SourceIdentifier attribute in the parent table and
returning the ID for that row from the Parent table.
HTH
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals -
http://www.sqlpass.org [quoted text, click to view] "Mehdy" <redinblack@zworg.com> wrote in message
news:16e1ae63.0406292348.49c6edd7@posting.google.com...
> Salute,
>
> Consider this scenario :
> I have a master/detail database,
> and another database with the same schema but different data.
> Now, how can I ADD the master/detail data from the second DB
> to the first one ? how can I resolve the identity conflict ?
>
> If I use DTS with "enable Identity Insert" option,
> the old records' identity may conflict with new records' identity.
> If I don't use this option, my master records will get new identity
> values and I lose relation between my new master data
> and new detail data.
>
> Any Ideas?
>
> Regards,
> Mehdy Mohajery