Can we assume you are using SQL 2005/08 and SSIS, not SQL 2000 and DTS?
If so, set up your Data Flow task with the Flat File source, a Data
Conversion, and your SQL Destination (or whatever destination you are using).
The key here is in the Data Conversion. Convert your respective fields
(giving each a new name) and new (shorter?) character lengths. Now add a new
Flat File Destination, and drag the red arrow from the output of the Data
Conversion to the new Flat File. When you do, you should be presented with a
dialog box for you to configure the Error rows of the Data Conversion Task.
Set fields to "Redirect" under the Truncation event. Configure the new Flat
File Destination to save to a new Flat File Connection Manager (NOT your CSV
source).
When you run the package, any field that would get truncated by the Data
Conversion will be sent down the error (red) path to the flat file. Examine
the contents of the flat file after running to see those rows.
HTH
=====
Todd C
Post by Feng XiaoheI used to import data from csv file with the flat file destination component.
But I want to redirect the data flow to a error log table when the importing
csv file's data length is too long, then I found I can't get the actual data
while error occured. Is there any good method to solve it?
Thank you
Feng Xiaohe