Alteryx Designer Discussions

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

Error when output (insert/update) to SQL database

6 - Meteoroid





Hi Alteryxes


I am getting this error when outputting my data. I have run it for weeks without any problems. So I guess I should look for something in the input data



Output Data (155) DataWrap2ODBC::SendBatch: [Microsoft][SQL Server Native Client 10.0]String data, right truncation Insert into "codereadr_afstigning"("scan_id","Scanstatus","User Name","User ID","Device Name","Device ID","Service Name","Service ID","Scantype","Interviewer ID","Vagtnr","Delvagtnr","Afstigningsnummer","Afstigningssted","Afstigningsdato","Afstigningstid","Afstigningstidspunkt","Afstigning Longitude","Afstigning Latitude","levering","Modtaget dato") Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)



I would assume that the ?,?,?, in the error message indicates, that there are empty rows or fields in data, but there isn't.


My workflow and input files are attached.


Thanks in advance, if you are able to help me out.


Best regards,

Dorte Larsen

5 - Atom

I am having the same issue. 


Found this:


But so far no results. 

7 - Meteor

I'm having the same error as well, has anyone found any solution to this?

7 - Meteor

Looks like I fixed this by letting the workflow create a new table instead of appending my table, and then when that successfully worked I checked the table Alteryx created against the table I was trying to append to.  Apparently, I had a few of my nvarchar sizes set too small.  I adjusted the field sizes, and it worked great!

Alteryx Partner

Hello @dla- How did you solve this issue? Please share!

8 - Asteroid

Hi @JustinBabbitt,


It looks like it could be caused by the size the data being larger than the columns in the table. You might want to use an auto field tool to check the size of your data and compare those results with the table structure you are inserting into. 

Alteryx Partner

Thanks @Nate1


I noticed after added the AutoField tool that one of my DateTime columns was set to VW_String, which was causing the holdup. 



6 - Meteoroid

I do have a similar issue, which is happening for several tables. I am trying to move data from one SQL Server into an Azure SQL server using the "Input Data " object. Because in the source tables I have a "binary" column, I get the next err. 


Error: Input Data (61): Error SQLExtendedFetch: [Microsoft][ODBC Driver 17 for SQL Server]Error in row[Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation


If I exclude that column from the select statement , the issue disappears .

I have also tried to use a "Data Cleansing" or a "Select" object , in order to change their type / un-select that column , but each time, the "Input Data" gives this err if the column is in the select statement.  

The workflow is a straight one - I read data with an "Input Data" -> I create a table and insert data with an "Output Data"



Any suggestions ?

5 - Atom

All I can say is make sure you check all of you data types when inserting into a table!!! I would guarantee your data types are off here, as I've seen this issue several times in alteryx and I always fix it with a data type correction.


For example if I'm inserting a column "dob" from my workflow which is a v_string and in my table "dob" is of type date, I need to ensure that I do the proper conversions on the alteryx side!


Also, ensure that if you are inserting into a table with string values that your values going in are the same length or under the length of the varchar/string in the table! For example, column "zip" in my alteryx workflow is a v_string of length 500 but in the sql table column "zip" is a varchar of length 255 (This will error)! "zip" in alteryx needs to be less than or equal to 255!!1

5 - Atom

My fix for this issue is using a Select tool to change the data types and field sizes to match EXACTLY the field sizes of the destination SQL table.