Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)

 Error While importing Excel Data using SQL Server Import Wizard

 - Executing (Error)

Messages

Error 0xc020901c: Data Flow Task 1: There was an error with Source - Worksheet$.Outputs[Excel Source Output].Columns[Address] on Source - Worksheet$.Outputs[Excel Source Output]. The column status returned was:

"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 "Source - Worksheet$.Outputs[Excel Source Output].Columns[Address]" failed because truncation occurred, and the truncation row disposition on

"Source - Worksheet$.Outputs[Excel Source Output].Columns[Address]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

 (SQL Server Import and Export Wizard)

 

- Executing (Error)

Messages

Error 0xc020901c: Data Flow Task 1: There was an error with Source - Worksheet$.Outputs[Excel Source Output].Columns[Address] on Source - Worksheet$.Outputs[Excel Source Output]. The column status returned was: "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 "Source - Worksheet$.Outputs[Excel Source Output].Columns[Address]" failed because truncation occurred, and the truncation row disposition on "Source - Worksheet$.Outputs[Excel Source Output].Columns[Address]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

 (SQL Server Import and Export Wizard)


Solution 

SQLServer just check top 8 rows of excel data by default and estimate the column type and width. So you can change the default setting to top n rows or even remove limitation like this:

Open windows registry with regedit command.

Go to this path in windows registry:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Jet\4.0\Engines\Excel


 Change the value from 8 TO 0


 

Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup