Exec stored procedure in sql query expression

I have a Stored Procedure which return a scalar value at the end.

When I used sql qeury expression in Ignition and use exec <SP_Name> , the return value shows 1 which is the execution success and not the scalar return from SP.

I have checked the query in query analyzer and there it shows the proper expected string value.

What I want is to execute a stored procedure with parameters and use the scalar value in the expression item.

I am aware of using Functions etc but I have a IBM DB2 linked server in my sql server 2008 and the queries are quite complex and some statements cannot be used in functions.

I am using Ignition v 7.6.6

If an expression doesn’t return the value then you could write a Python function that calls your stored procedure and returns the value. You could use the runScript expression function to call your Python function in an expression.

Best,

I really want to avoid python scripts and even the executequery functions etc.

Does any ignition newwer version support declare statements etc in the sql expressions?

7.6.6 does not support the sql query script which will run successfully in query analyzer but contains declare variable statements etc