In SSIS, I can insert rows and get their SCOPE_IDENTITY using the OLE DB Command Task, which calls a stored procedure, but this is not a bulk insert, it is slow loading. Is it possible to get the id of inserted rows using bulk insert in SSIS?
Example: When inserting a customer, you first need to insert the record into the Person table, and then use this FK in the Customer table.
UPDATE:
Here is the structure of the Person and Customer tables that must be populated from an external source.

One option is to have an OriginalId in Person table so that I can use it when searching when populating the Customer table. But this does not answer my question about SCOPE_IDENTITY and fast loading
sql-server insert ssis bulk
ilija veselica
source share