Solved

trying to import delimited file

Posted on 2015-01-23
5
105 Views
Last Modified: 2016-02-15
Hello! I have a tab delimited file that I am trying to import into SQL, but I cannot because of these errors below. Can anyone tell me how I can get this into SQL?

- Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "CompanyName" 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: The "output column "CompanyName" (46)" failed because truncation occurred, and the truncation row disposition on "output column "CompanyName" (46)" 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: An error occurred while processing file "C:\Users\xxx\Desktop\file.txt" on data row 47.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047038: Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - file" (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)
 
Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "SourceThread0" has exited with error code 0xC0047038.  There may be error messages posted before this with more information on why the thread has exited.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047039: Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread0" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
 (SQL Server Import and Export Wizard)
0
Comment
Question by:mrosier
  • 2
  • 2
5 Comments
 
LVL 45

Expert Comment

by:Vitor Montalvão
Comment Utility
The data conversion for column "CompanyName" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

Where the file is coming from?
What is the size of the CompanyName?
Can a record that you are trying to import be larger than that size?
This process always worked?
0
 

Author Comment

by:mrosier
Comment Utility
it is coming in from just a tab delim. file. I am not sure as to the content of the data, but is there a field type/length I could use that should just allow anything in? We have always imported these  tab-del files before, but not this particular instance.
0
 
LVL 45

Accepted Solution

by:
Vitor Montalvão earned 500 total points
Comment Utility
You should verify and compare the lengths from file and table fields. If SQL Server is truncating the value is because is reading something bigger than what he can fits in that specific column.
0
 
LVL 18

Expert Comment

by:SimonAdept
Comment Utility
I think it's either truncating or using a wrong code page.Check code page on the import wizardTry Vitor's suggestions, but also worth checking that when you import it either shows ANSI - Latin I or UTF-8.

Sometimes formatting codes or other characters (eg. in barcode encodings) can fool the Wizard into thinking it should use some exotic code page.

You can open the file in Excel first to have a quick look at field lengths. If you're creating a new table when you import it shouldn't give you truncate errors unless you have very long strings.
0
 

Author Comment

by:mrosier
Comment Utility
Ok so the answer turned out to be just making all the fields 255. Thanks!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In couple weeks ago, I encountered an extremely difficult problem while deploying 2008 SSIS packages to a new environment (SQL Server 2014 standard).  My scenario is: We have one C# application that is calling 2008R2 SSIS packages to load text fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now