AnsweredAssumed Answered

How to use Execute SQL action to send an int value

Question asked by dldavis2010 on Jan 26, 2015
Latest reply on Jan 29, 2015 by burkslm

I'm new to the nintex workflow game but I have a good amount of SQL experience. Currently I am trying to use a nintex workflow to create a row in a SQL table. Here is the statement I am trying to use.


Insert into Opportunities(OrgCompany, OrgGlobalPractice, OpportunityName, OpportunityLaborHours, OpportunityStart, OpportunityEnd)

values ('{WorkflowVariable:Co}', '{WorkflowVariable:GP}', '{ItemProperty:Project_x0020_Name}', cast('{ItemProperty:OpportunityHours}' AS int), '{ItemProperty:Start_x0020_Date}', '{ItemProperty:End_x0020_Date}')


I'm currently getting this error every time I try to run it using the run now feature of nintex designer.


The execution returned an unexpected error.

Conversion failed when converting the varchar value '{ItemProperty:OpportunityHours}' to data type int.


Whether I use convert, cast, or just send the value I get the same error. The column is a calculated value but it's still a number that is retrieved. I've used the log in history list to see what value is output and it is a number. I'm sure I'm just missing something small but I've been working on this for several days now and have not been able to get anything to work.


Thank you for your help,

Daniel L Davis