Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

DataWrap2ODBC::SendBatch: [Microsoft][SQL Server Native Client 11.0]String data, right tru

nhunter
7 - Meteor

Designer 11.5.1.35081

 

I'm getting this message when using an output control to write data to a SQL server database table

 

DataWrap2ODBC::SendBatch: [Microsoft][SQL Server Native Client 11.0]String data, right truncation 

 

I added formulas to check the length of each of the text values and they are all shorter than the size of the corresponding columns in the table.

 

I tried writing the data to an Excel worksheet, then loading the data from the worksheet to the SQL server table and this workedfine.

 

I tried trimming all the text values but this did not help.

 

I'm looking for more ideas to help diagnose and fix the problem.

 

Is this issue only caused by text fields which are too long? There are also Date and Fixed Decimal values in the data. Could one of them be causing the problem? 

9 REPLIES 9
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

@nhunter  I haven't run into this with SQL server specifically, but I have seen it in other DB's.  In my experience, yes it could be anything.

Generally you can clear up/start narrowing down a few different ways:

1. Add an Auto-Field tool right before your output tool.  See what it changes and if that still throws the same errors.

2.  If that doesn't help get you to the right answer, add a Dynamic Select (or Select) right before the Output and only insert fields of the same type and size each run (to temp tables or something you can dump).  Keep doing this until you hit the error and then you can get more info about what's causing it. 

nhunter
7 - Meteor

Thanks, Patrick.

 

It appears that this error will occur when one tries to insert a column defined in the Alteryx dataset as Fixed Decimal 19.6 into a column in a SQL Server table defined as Fixed Decimal 19.5.

 

Fixed Decimal is a String data type. Who knew?

patrick_mcauliffe
14 - Magnetar
14 - Magnetar

Huh... that's news to me...

zbowden2010
6 - Meteoroid

Thank you, changing Fixed Decimal to Float fixed the issue for me.

gawdenikita10
5 - Atom

thank you so much it worked for us!!!!! we're so grateful

RossLewis76
5 - Atom

Changing fixed decimal to float worked for me as well.  Amazing stuff, I've been tearing out my hair for hours trying to fix this!

 

Naveen_SV
5 - Atom

Best way is to configure your ODBC Connection 

Nonsensely
7 - Meteor

Didn't work for me trying to use ODBC to write to DB2 on iSeries.  It worked to create the table fine, just won't let me write to it!  

arshuhansda
5 - Atom

Anybody has a solution for this? I don't have any floating columns. I only have string columns and all of their sizes have been reduced, but still got the error.
Thanks in advance!

Labels