How do I fix 'Invalid character value for cast specification' on a date column in flat file?

后端 未结 3 434
春和景丽
春和景丽 2021-01-04 04:48

I have a CSV file with a {LF} delimiting each row and a date column with the date format as \"12/20/2010\" (including quotation marks)

My destination co

3条回答
  •  醉话见心
    2021-01-04 05:05

    The proper data type for "2010-12-20 00:00:00.0000000" value is DATETIME2(7) / DT_DBTIME2 ().

    But used data type for CYCLE_DATE field is DATETIME - DT_DATE. This means milliseconds precision with accuracy down to every third millisecond (yyyy-mm-ddThh:mi:ss.mmL where L can be 0,3 or 7).

    The solution is to change CYCLE_DATE date type to DATETIME2 - DT_DBTIME2.

提交回复
热议问题