Ness Posted February 4, 2021 Report Share Posted February 4, 2021 How can I get multiple values back from multiple SQL statements in a stored procedure in MySQL? Stored Procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `get_test`(OUT var1 INT, OUT var2 INT ) BEGIN SELECT Temperature into var1 FROM `interface`.`setpoints` WHERE Area = 1; SELECT Temperature into var2 FROM `interface`.`setpoints` WHERE Area = 2; SELECT var1, var2; END In MySQL Workbench: CALL `interface`.`get_test`(@a1,@a2); Result Grid shows: var1 | var2 750 | 850 In UniLogic my Query is: CALL get_test(:a,:b); The query executes successfully but doesn't return any values. The two tags tied to the Query Outputs keep their current values and aren't changed. Do I just need the proper SQL incantation to get this working? Or are out parameters not supported with UniLogic? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.