question

Vani CS avatar image
Vani CS asked

How to redirect erroneous rows to separate sql table?

Hi,

I have an SSIS package in which i am pulling data from an excel source to an OLEDB destination. This is working fine when all the rows in excel is having proper data. but if the excel contains erroneous data then want to pull the erroneous rows to a separate sql server table and the proper rows to another sql server table. Please advice me how to do this?

ssis
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
TG avatar image
TG answered

Load all rows to a "staging" table which has no constraints and generally typed columns so all rows are guaranteed to insert successfully. Then create a separate, t-sql based process to load all "proper" data to the respective target(s). Deal with the "erroneous" data as necessary including data cleanup, notifications, etc.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.