SSIS Error while executing data flow task - import excel into sql table
I have created ssis package that is taking data from excel file and insert data into table
I have one Excel Source
and Ole db connection
but i'm getting following errors:
[Excel Source [1]] Error: There was an error with output column "F2" (18) on
output "Excel Source Output" (9). The column status returned was: "The value could
not be converted because of a potential loss of data.".
[Excel Source [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.
The "output column "F2" 开发者_开发百科(18)" failed because error code 0xC0209072 occurred, and
the error row disposition on "output column "F2" (18)" specifies failure on
error. An error occurred on the specified object of the specified component.
There may be error messages posted before this with more information about the
failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput
method on component "Excel Source" (1) returned error code 0xC0209029. The
component returned a failure code when the pipeline engine called PrimeOutput().
The meaning of the failure code is defined by the component, but the error is
fatal and the pipeline stopped executing. There may be error messages posted
before this with more information about the failure.
`
The line:
The value could not be converted because of a potential loss of data
Suggests that you have a field such as a string that may be longer than the SQL table field. E.g. you have a 60-character string that you're trying to insert into a Varchar(50)
field?
Or perhaps a decimal number into an Int or similar?
Check your datatypes match, in other words.
It's a classical data conversion error. Check the definition of your destination table, maybe you have a too short varchar datatype. Alternatively when you connect the data source to your destination, instead of choosing your table, select "new" right next to the drop down list. SSIS then suggests a table definition for you with datatypes that should work.
Occasionally the Excel connection "Gets Lost". If you hover over the columns, you may find that the data types are incorrect. What has worked for me is to uncheck the column, save the changes without it, then recheck the column. This will cause SSIS to recreate the metadata behind the package.
uncheck the column coming from execl file..and recreate...this will change metadata :) Work
精彩评论