SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 0xc02020a1 error when importing.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

taunt
Posting Yak Master

116 Posts

Posted - 06/06/2014 :  19:33:10  Show Profile  Reply with Quote
Hello I'm getting this error while trying to imprt a txt file into sql:


- Executing (Error)
Messages
•	Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 22" 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 "output column "Column 22" (98)" failed because truncation occurred, and the truncation row disposition on "output column "Column 22" (98)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
 (SQL Server Import and Export Wizard)
 
•	Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "Y:\update.txt" on data row 22.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - update_txt" (1) returned error code 0xC0202092.  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.
 (SQL Server Import and Export Wizard)


I'm importing the txt file into a new table. How can I fix the error.

Thanks

tkizer
Almighty SQL Goddess

USA
36834 Posts

Posted - 06/06/2014 :  19:35:47  Show Profile  Visit tkizer's Homepage  Reply with Quote
The import package is configured to fail if a column's data will be truncated due to the size of the column and how big the data is in the file. Expand the column, fix the file, or change the package so that it doesn't fail on this condition. I would expand the column, but it's up to your business requirements for this import.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

taunt
Posting Yak Master

116 Posts

Posted - 06/09/2014 :  14:38:05  Show Profile  Reply with Quote
Would I need to do this to turn warnings off?

SET ANSI_WARNINGS OFF


quote:
Originally posted by tkizer

The import package is configured to fail if a column's data will be truncated due to the size of the column and how big the data is in the file. Expand the column, fix the file, or change the package so that it doesn't fail on this condition. I would expand the column, but it's up to your business requirements for this import.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/

Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36834 Posts

Posted - 06/09/2014 :  14:41:29  Show Profile  Visit tkizer's Homepage  Reply with Quote
You could try that, but the data is going to be chopped off. Is that what you want? Is that what the business wants? Why not expand the column to fit the data?

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000