another approach, to load massive group data instead of dealing row by row:
On database
- create an staging table (e.g. StagingTable [name], [price])
Create a procedure (you may need to change the objects names, and add transaction control and error handling etc just a draft):
create procedure spLoadData
as begin
update DestinationTable set DestinationTable.Price = StagingTable.Price from DestinationTable join StagingTable on DestinationTable.Name = StagingTable.Name insert into DestinationTable (Name, Price) select Name, Price from StagingTable where not exists (select 1 from DestinationTable where DestinationTable.name = StagingTable.Name)
end
On SSIS
Execute SQL Task with (truncate [staging_table_name])
Data Flow task transferring from your Flat File to the Staging Table
Execute SQL Task calling the procedure you created (spLoadData).