Hello, is there a way for bulkcopy to set the PKs of the records inserted? I need to use the PK values in subsequent save operations after the bulkcopy. Thanks.
Bulk copy doesn't provide such functionality so some of your options are:
set ids on client before instert (and allow identity insert if identity pk used)
load records after bulk copy
insert using MergeWithOutput to return generated ids and then assign them manualy
for ids, generated by sequence: use DataExtensions.RetrieveIdentity to assign ids to entities using database sequence and then insert them using bulk copy
Hello, is there a way for bulkcopy to set the PKs of the records inserted? I need to use the PK values in subsequent save operations after the bulkcopy. Thanks.
Using MS Sql Server