Inserting Bad Data as NULL with OLE DB Destination

  • Under our old DTS packages, bad data (like 32-12-2009) would be inserted into our tables as NULL values. However, in SSIS, it is just being skipped and never added.

    Before I go the route of setting up reject files and stuff like that, is there anything I can do to tell SSIS that if the data won't jive, to insert its value as NULL?

    Thanks!

    Michael

    P.S. This is being imported from a text file.

  • Michael Esposito (6/30/2009)


    Under our old DTS packages, bad data (like 32-12-2009) would be inserted into our tables as NULL values. However, in SSIS, it is just being skipped and never added.

    Before I go the route of setting up reject files and stuff like that, is there anything I can do to tell SSIS that if the data won't jive, to insert its value as NULL?

    Thanks!

    Michael

    P.S. This is being imported from a text file.

    Michael,

    Here is what you can do:

    1. Setup your flat file connection manager to import the value of the problematic column as text. In this way the row will not be outright rejected and will appear in your data flow.

    2. Create a script component, which tries to convert the problematic column to the type you need. If it fails to convert, set the value to NULL.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Viewing 2 posts - 1 through 1 (of 1 total)

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