Temp Flat File read back dt_date
I have a single flat file connection manager for temporary data, one column is typed DB_DATE In my control flow I delete the file and then aggregate a bunch of data into it. The date column has YYYYMMDD dates, written by the connection manager. In a later data flow I attempt to read this data in, using the same connection manager. The source cannot parse the dates. What gives? It seems the flat file cm is writing data it can't read.
May 5th, 2011 10:23pm

It seems the package was edited so that a DT_STR was passed into the flat file destination for the CM. This should have cause an error (as the column data type was DT_DATE), but it did not - and was written verbatim to the destination, causing an error on import. Fixed manually.
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 10:57pm

Hello, Please check this post http://dbaspot.com/ms-sqlserver/222465-ssis-cannot-load-flat-file-date-into-database-table-date-dataflow-task-truncates.html you need to read the data as string , then you can use Derived Column Transformation to change your data column into Date Format you want. Thankshttp://sqlage.blogspot.com/
May 5th, 2011 11:03pm

Hi Aamir, The issue was that I had a connection with a column type of DT_DATE. When a destination wrote to this column, it would accept data of type DT_STR, which would lead to an output which did not match the specification in the flat file connection manager. The solution was to provide a DT_DATE to the destination, which would then serialize and round-trip correctly. The destination component accepting a DT_STR for a column typed DT_DATE, I feel, is incorrect behaviour - the flat file destination component should have failed with mismatching metadata. Cheers
Free Windows Admin Tool Kit Click here and download it now
May 6th, 2011 3:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics