cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Execute SQL Query with Parameters

I'm trying to execute a query and return results to PA.  I can't get the query to run successfully with a parameter...although I can hardcode the parameter and the query works fine.  It picks up the parameter input but never returns a ResultSet.

Declare @UnitNumber int
SELECT AVG(SOSTotalTime) AS AverageSOS, DayPart 
FROM dbo.vw_SOSbyOrder 
Where UnitNumber=@UnitNumber
GROUP BY DayPart

Capture.PNG

3 REPLIES 3
Highlighted
New Member

Re: Execute SQL Query with Parameters

I am trying to something similar and followed this video:

 

https://powerusers.microsoft.com/t5/Community-Video-Gallery/Friday-Functions-Series-SQL-Declare-Form...

 

2 minutes and 20 seconds into the video, he saves the flow and refreshes the page, which makes the variable appear. 

 

I cannot get this to appear, which I think maybe the issue we are both facing.  

 

Has anyone else faced this issue?

 

Highlighted
New Member

Re: Execute SQL Query with Parameters

Hi,

 

Has this issue been resolved yet?

 

 

Kind Regards,

Daniel

Highlighted
New Member

Re: Execute SQL Query with Parameters

anyone get this to work?

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (6,526)