Stored procedure with MSSQL-Plus node

Hello. I have been successfully executing SQL queries via the MSSQL-Plus node for many months, and am now trying to execute a very simple stored procedure. I am getting the error(s) shown below and have attempted various changes with no success. All that is happening is here is I am trying to use an integer value (in this case 257, whose path is payload[0].CustomerID) as an input to the stored procedure. Hoping the fix is something small and obvious. Thank you.

The answer is to remove EXEC (this for executing stored procedures in a query)

This is how it should be setup properly to avoid SQL injection...

Thank you for the helpful annotated screenshot. I got the simple stored procedure working and have now moved on to a slightly more complex one that requires 3 inputs:

EXEC dbo.USP_InsertCustomerReportRequests 17, 'name@example.com', 'xrptCustomerInventory'

The 1st parameter is the CustomerID and is obtained earlier and defined as msg.payload[0].CustomerID

The 2nd parameter is the email address of the person making the request and is defined earlier as msg.from

The 3rd parameter will always be exactly what you see above, i.e. xrptCustomerInventory

Below is a screenshot of the error that I am getting. I have tried the part in yellow with and without the ' marks, but still get the same result.

Where you have entered the report name, the type is alread set to string so it doesnt need the quotes.

so try xrptCustomerInventory instead of 'xrptCustomerInventory'

Thank you. It works perfectly now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.