Populating Tags with Values from a Stored Procedure

I have a stored procedure that takes a parameter input and returns 10 values. I want to put these values into 10 tags. I see the following ways to do this:

  1. Create 10 SQL tags and write a SQL statement that returns one value. I would have to deconstruct my SP to use only the tables and joins I need to get the one value.
  2. Use a transaction group. I am not sure if this will work and I have not figured out how to pass a parameter to a stored procedure.
  3. Write a script that periodically runs. I would execute the SP and then stuff the result values into the tags.

None of these seem great. Any other ideas or opinions on what is the best way to do this?

There is a stored procedure type of transaction group specifically for this operation. Use sqltag items and specify input, output, or both for each. “Target Name” is the SP’s parameter name or index instead of a column name.

Thanks for the info. I think I have the parameter mapping working but I am not sure how to map the output of the SP to s specific tag. In the picture below I am mapping two tags to the 2 parameters of the SP (I assume that is the Target column). Does this look correct?


I just watched the example video. I appears that a Stored Procedure Transaction Group only works with parameters. It can not handle recordsets returned by an SP. Am I correct?

[quote=“CJVR”]It can not handle recordsets returned by an SP. Am I correct?[/quote]Correct.
You would “Select … Into …” to put the row into your output parameters. Also, I think you had the in/out direction backwards in your image. Should look like: