load from csv to db table problem

  • Hi,

    I have a problem. I'm trying to load records from csv file (with ; as col separator and " as text qualifier) to

    a database table in MSSQL 2005 by SSIS. My problem is that there's a column in the table with datetime

    datatype, and when the according field is empty in the csv file (...prevfield;;nextfield;...), the package fails with error: Error 0xc0202009: Data Flow Task: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.

    An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".

    How can I get this to load NULL value to a datetime column if the csv contains empty value?

    Thx,

    krampusz

  • One bad way would be to set 'ignore error' for that column. And after the transformation, u can check that column value or set what u want.

  • I'm having the same problem. How do you get it to "ignore error"?

  • OK, I've found the solution. The "keep NULL values" must be checked.

    (honestly, why isn't it checked by default? it would be the logical way for me)

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

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