Sunday, February 22, 2015

Errors while importing data from Excel to SQL Server and their solutions - 2


Error 0xc02020c5: Data Flow Task 1: Data conversion failed while converting column "Role" (35) to column "Role" (93).  The conversion returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
 (SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task 1: The "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[Role]" failed because truncation occurred, and the truncation row disposition on "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[Role]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
 (SQL Server Import and Export Wizard)

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Data Conversion 0 - 0" (61) failed with error code 0xC020902A while processing input "Data Conversion Input" (62). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.
 (SQL Server Import and Export Wizard)


 This error occurs when you try to insert data whose length is larger than the destination column. Here the column role I defined in destination was of length 20 while the data i was trying to insert in that column was larger. When I altered the table, it worked.

Use below query to alter your destination table.
Alter table wallmart.dbo.item
Alter column Role varchar(50) not null


 

No comments:

Post a Comment