February 23, 2015 at 1:15 am
i am trying to insert bulk data into main table from staging table in sql server 2012. if any error comes, this total activity is rollbacked. i dont want that to happen. i want to know the records where ever the problem persists, and the rest has to be inserted. please suggest.
February 23, 2015 at 3:33 am
You need to capture the errors when inserting into the OLEDB Destination. I suggest creating an Error table with columns that match your destination table and then connecting the error output (red) to that destination table. And/or, you could put a Data Viewer on the path prior to the OLEDB Destination and eyeball the data as it flow through.
Regards
Lempster
February 23, 2015 at 9:12 am
Shifting gears a bit, the whole idea of a staging table is to pre-validate rows of data so that you don't end up with such a problem as rollbacks. I typically add a column or two to my staging table so that I can mark rows that need to be inserted or updated or shouldn't be used because of a validation error and the other column for why the row failed validation.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply