Insert a single row and return its primary key
Good question, took me a few tries to figure it out. Declare an SSIS variable of type Int32 (unless you need sizing for a bigint or numeric). I chose tablePk as mine. Option 1 Execute SQL Task General tab ResultSet: None SQL INSERT INTO dbo.ImportData (EndDate) VALUES (NULL); SELECT ? = SCOPE_IDENTITY() Parameter Mapping tab … Read more