Reputation: 4239
I have database with following 3 tables:
I use SQL Server Integration Services.
I have also XML file with pairs of addressEntityID and customerEntityId. These are are EntityIDs (GUID), that need to be mapped to IDs (integer) and inserted into CustomerAddresses.
How to map this relationship and import to CustomerAddresses?
I want to do something like, for each row, select CustomerId from Customers where EntityId = {0}
and then use this value to insert. Can this be done?
And before you suggest, that I should use EntityId as PK, the reason is, that those are not provided for all data in database. Only data, that are imported, and come from another system, those have EntityId.
Upvotes: 0
Views: 372
Reputation: 4239
Upvotes: 1