Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

Stored Procedure returning empty result set

I've been trying to follow along with the blog post and video on how to return an array from SQL and I'm not able to get a resultset from the stored procedure from an on-premise SQL gateway. My ultimate goal is to be able to pass parameters to the stored procedure, but I'm stuck on just getting any kind of result with hardcoded parameters.

Stored Procedure:

ALTER PROCEDURE [dbo].[uspSelectedParticipants]

    @Program Varchar(max)='''Tracking Out'', ''After School''',
	@Branch varchar(max)='''YT Testing''',
	@SITE varchar(max)='''YT-Green Elementary'''


    Declare @SQL Varchar(max)
    Set @Sql = 'SELECT MASTER_CUSTOMER_ID, firstname FROM PA_Current_Participants_VW

    Exec (@SQL)


I created a flow that runs off a button and while it runs successfully, I get this in the Outputs:

  "OutputParameters": {},
  "ResultSets": {}

What am I missing here?

Community Support
Community Support

Hi @BegeNCSU ,


MS Flow cannot return OUTPUT parameters from a stored procedure, please check Known issues and limitations:


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the quick reponse! 
In the link you sent, under item 3 it states 

  • Only the first result set is returned

That makes me think that I can return at least 1 results set. Am I reading that correctly?

Hi @v-bacao-msft , 

Thanks for your response. It was a big help yesterday when i followed your link and learned about the limitations of the on-premise sql connector. However, when I revisit that same page today, that entire "known-issues-and-limitations" is gone!!  


May i know if these limitations are being taken care of? especially the one where it says "When invoking a stored procedure from an on-premise SQL server, return value is not available."


Thank you for your help! 

Advocate II
Advocate II

I will say that I've been able to run stored procedures and get the results back into my flow so long as it was just a single table. Once you're able to get to the part where you can successfully kick off the stored procedure, you'll need to parse just a specific part of the output into JSON.

Thanks! I have it working today. Not sure why no value return when i first tested it. 

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,118)