SSIS date converison craziness

  • I have two tables, say, tableA and tableB. TableA contains a string column holding dates values. Some of those values are valid, some are NULL, and some are invalid (e.g. 02/31/2008). I want to transfer the valid and NULL string dates over to tableB which has a single column of type datetime. Regarding the bad dates I need to know which records contain them.

    What's the best way to approach this using SSIS?

    TIA,

    barkingdog

  • Hey,

    What you need is a Data Flow task. This should pipe data from TableA to a Data Conversion task, what you should be able to do is send the ok rows to one source, say TableB and the Error rows to another say TableC. You will need to 'Configure Error Output' on the Data Conversion task to 'Redirect Rows' upon failure of the conversion.

    Hope this helps.

  • If TableA and TableB are SQL Server tables, you can also use the ISDATE() function in the where clause to select/omit records.

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

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