5

I am trying to import a 4gb csv file into a new table in sql server using the wizard. And when I do I get the errors below. I also included the 2nd row of the file I am trying to import without the headers. Any idea on how I can fix this?

Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column ""Other Provider Identifier Issuer_2"" 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 ""Other Provider Identifier Issuer_2"" (466)" failed because truncation occurred, and the truncation row disposition on "output column ""Other Provider Identifier Issuer_2"" (466)" 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 "C:\Users\test\Desktop\NPPES_Data_Dissemination_June_2013\npidata_20050523-20130609.csv" on data row 79. (SQL Server Import and Export Wizard)


Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - npidata_20050523-20130609_csv" (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)

0

2 Answers 2

5

You're getting a truncation error, meaning the data that's coming in is larger than the field size you have specified. Try increasing the destination table field size and you should be good to go.

I get these alot when I work with email addresses as the SQL import wizard defaults to 50, I always have to increase it every time I do a fresh import.

2
  • Even though it is creating a new table I can set the field size?
    – user1342164
    Jun 19, 2013 at 15:21
  • Yup, you sure can, when you select your file that you're going to import, click "Advanced" on the left side and you can set lengths/types on the destination table.
    – Kris Gruttemeyer
    Jun 19, 2013 at 15:24
2

The length of your column in the new table is too small and the longer value from the file gets truncated as it cannot fit into the table column.

Data conversion failed. The data conversion for column ""Other Provider Identifier Issuer_2"" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page."

Check the value in the file in line 79:

Data Flow Task 1: An error occurred while processing file "C:\Users\kozlmic-admin\Desktop\NPPES_Data_Dissemination_June_2013\npidata_20050523-20130609.csv" on data row 79

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.