Quantcast
Channel: Nintex Connect: Unanswered Threads
Viewing all articles
Browse latest Browse all 2462

Unable to insert integer or date fields with Execute SQL

$
0
0

I must be missing something.

I'm using the Execute SQL task to insert a record into a database table.  Everything works fine as long as my values are strings but I have one int and one datetime field that fail no matter what I try.

If I put single quotes around my value I get the following error:

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

However, if I remove the single quotes I get this:

Incorrect syntax near 'ItemProperty:'.

My full query looks like this

INSERT INTO dbo.BlitzData (BlitzName, ReferringEmployee, EmployeeLocation, CompanyName, LastName, FirstName, JobTitle, telephone1, Address1, Address2, City, State, PostalCode, HowDoYouKnowReferral, Description, ReferralDate)
VALUES ('Business Blitz 2013', '{ItemProperty:Employee}','{ItemProperty:Employee_x0020_Location}','{ItemProperty:Business_x0020_Name}', '{ItemProperty:Contact_x0020_Last_x0020_Name}', '{ItemProperty:Contact_x0020_First_x0020_Name}', '{ItemProperty:Contact_x0020_Title}', '{ItemProperty:Contact_x0020_Phone}', '{ItemProperty:Contact_x0020_Address_x0020_1}', '{ItemProperty:Contact_x0020_Address_x0020_2}', '{ItemProperty:City}','{ItemProperty:State}','{ItemProperty:Postal_x0020_Code}',{ItemProperty:Relationship},'{ItemProperty:Description0}', {ItemProperty:ReferralDate})


Viewing all articles
Browse latest Browse all 2462

Trending Articles