sql-serversql-server-2005ssisssis-2005

Date format changed in error output text file


I have a file to be loaded into SQL Server 2005 using SSIS 2005.

The file has a date field. The values are like '12/01/2010 16:38:51'.

Some of the rows in the file are wrong and will be redirected to a text file. But in the text file, the date will be changed to 2010-01-12 16:38:51 by SSIS.

Anyway to just redirect error rows to the text file without any modification?


Solution

  • I found if the output columns in the flat file error output of advanced editor of the flat file source is 'Flat File Source Error Output Column' (and the type of the column should be text stream [DT_TEXT] by default) then my problem is solved. This way, the flat file manager for the error output will automatically set the output columns to 'Flat File Source Error Output Column' and of type 'text stream [DT_TEXT]'. This is exactly what I wanted. SSIS treat the whole row as a single column of type 'text stream [DT_TEXT]' and just redirected. And this seems to be the default behaviour of SSIS. But in my original package, I somehow messed up and let each column from input mapped to a column in the error output. Then there was problem because SSIS was doing the date conversion things.

    Anyway thanks for the help.