How to pass a null input for Execute Stored Procedure plugin expression?

Hello!

I am using 16.2 and SQL server. I have a stored procedure with 4 inputs and those all 4 inputs can be null. The SPROC is defined to return summation of few columns. When I am executing the stored procedure in SQL server with all inputs as null, it's returning proper data.

However, when I tried to run the SPROC with null inputs via executeStoredProcedure plugin expression, it returns just null values.
How can I get the actual results by passing null values to a stored procedure?

Thank you!

OriginalPostID-260253

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi Omkar,

    I tried replicating your issue and i didn't have SQL server i used MYSQL and it worked fine for me and returned results.
    I am attaching screenshots with SPROC code in a zip for your reference and it would be helpful if can attach screenshots or code snippet of your code.

    The reason for your procedure for not returning values might be the values you are passing from appian might not be nulls they might contain spaces.

    As suggested by vinayak in the above comment try to add the results to a dummy table so that you can check the behaviour after the execution of the procedure.

    Hope this helps you.

    Forum Post.7z

Reply
  • 0
    Certified Lead Developer
    Hi Omkar,

    I tried replicating your issue and i didn't have SQL server i used MYSQL and it worked fine for me and returned results.
    I am attaching screenshots with SPROC code in a zip for your reference and it would be helpful if can attach screenshots or code snippet of your code.

    The reason for your procedure for not returning values might be the values you are passing from appian might not be nulls they might contain spaces.

    As suggested by vinayak in the above comment try to add the results to a dummy table so that you can check the behaviour after the execution of the procedure.

    Hope this helps you.

    Forum Post.7z

Children
No Data