Insertig failed records into a different table than good records.

  • I've been building an SSIS package in SQL 2014. I am running a query and inserting the returned data into a staging table before I create three separate CSV files from three separate queries of the staging table. I would like to insert records that fail being inserted into my staging table into a different table so that I can review the bad records and correct them and then rerun my package.

    My question is how would I go about doing that? I can supply more data if needed.

    Thanks.

    Ralph

  • Ralph

    Use an error output in your data flow.

    John

  • Thanks John.

    If this is how I have my data flow tasks configured, see below, where would I place the error output?

    Between the lookup and the "insert data into staging table task" or after "the insert data into staging task?"

    (Not sure if my image is displaying properly)

    Thanks.

    Ralph

  • Ralph L. Wahlert (8/1/2016)


    Thanks John.

    If this is how I have my data flow tasks configured, see below, where would I place the error output?

    Between the lookup and the "insert data into staging table task" or after "the insert data into staging task?"

    (Not sure if my image is displaying properly)

    Thanks.

    Ralph

    First, an error output comes FROM a component, not before/after a component. It comes from whichever component is the source of the error. If multiple components produce errors, you may need one for each of those components.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Thanks Drew.

    I get the picture now.

    Ralph

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply