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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
Anonymous
Not applicable

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 @Anonymous 

 

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.

Anonymous
Not applicable

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

@Addy2020 , seem more related sql server,

refer to this  type of error in this past

https://stackoverflow.com/questions/183488/what-does-the-sql-server-error-string-data-right-truncati...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.