cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RussellGove
Level 8

Execute a SQL Query

Hi,

I am trying to use the Execute a SQL Query as shown below:

Capture3.PNG

The flow fails with a message

Capture2.PNG


Capture.PNG\

 

How can I get the query to run?

 

Community Support Team Rank
Community Support Team

Re: Execute a SQL Query

Hi @RussellGove,

 

The 502 Bad Gateway error is caused when a network error between servers on the internet. The failure is temporary or transient, please try to resubmit to try the flow again.

Besides, clear your browser’s cache and delete your browser’s cookies would always work.

Please also try to run the browser in a safe mode to see if it will work.

If you are still having the issue, please feel free post back.

 

Best regards,

Mabel

RussellGove
Level 8

Re: Execute a SQL Query with formal parameters

Hi,

I dont think its a network issue. If I get rid of the formalParemter and use straight SQL it works fine. At the bottom of the post you  can see the error 'must decalare parameter giftyear;' . 

 

This question is really about how to use formal parameters in a SQL Query

ColonelJustice
Level: Power Up

Re: Execute a SQL Query with formal parameters

Hi, you have to declare the formalparameter as variable within the SQL query. So: DECLARE @userid VARCHAR(10); (or whatever value type) SELECT FROM a WHERE userid = @userid This way the parameters can be passed onto the query with the corresponding variable name. Best regards
Administrator Rank
Administrator

Re: Execute a SQL Query

Hey, @RussellGove!

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply any of these recommendations to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

>