Link to home
Start Free TrialLog in
Avatar of mrosier
mrosierFlag for United States of America

asked on

trying to import delimited file

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)
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

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?
Avatar of mrosier

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think it's either truncating or using a wrong code page.User generated imageTry 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.
Avatar of mrosier

ASKER

Ok so the answer turned out to be just making all the fields 255. Thanks!