Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Addy2020
Helper I
Helper I

String data, right truncation

While Uploading dataset to SQL Server using R getting following error:

"nanodbc/nanodbc.cpp:1655: 22001: [Microsoft][ODBC SQL Server Driver]String data, right truncation "

 

It seems to be column width issue but this error is not pointing me to any column. I have done upload of different PBI datasets many times though R getting this error for the first time.

 

Kindly help.

5 REPLIES 5
v-xiaoyan-msft
Community Support
Community Support

Hi @Addy2020 ,

 

Have you updated your SQL Server to the latest version?

We have found that inappropriate versions can also cause this problem.
I am not good at this, but I can confirm that the problem is with SQL Server, as your error port is [Microsoft][ODBC SQL Server Driver].
Please refer to the following two links to see if they help you.

sql-create-table-from-r-string-data-right-truncation 

KB2996629 - FIX: "String data, right truncation" error when you do bulk copy on DBCS by using ODBC D... 

 

Hope it helps,

 

Community Support Team _ Caitlyn Yan


If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Hi @v-xiaoyan-msft 

 

1st link talks about this issue fixed in SQL Server 2014. Mine is 2017 so it must contain that fix.

2nd link - in this case user had only 1 column so easy to apply fix in my case i have 84 columns so difficult to find out which column has size issue.

Hi @Addy2020 ,

 

Sorry for not being able to provide a specific solution, but in order to better solve your problem, we recommend that you visit the SQL forum here for more professional support.

 

Hope it helps,

 

Community Support Team _ Caitlyn Yan


If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

Hi @amitchandak 

 

The link you shared has error which referes probelamatic column while in my case error doesn't mentions problematic column in the absence of which its difficult to find column with problem.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.