web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Desktop...
Power Automate
Unanswered

Power Automate Desktop Execute SQL Statement Error, SharePoint List

(0) ShareShare
ReportReport
Posted on by

Hello everyone.
I'm having an error with "Execute SQL Statement" in Power Automate Desktop and I'm looking for a solution.
Does anyone know of a solution?

 


Error details:
The second "Execute SQL statement" always results in an error.


license:
Free

access point:
惻SharePoint list A   ex. 62bd0e3c-ab50-449e-b9ac-32ba73a95713
   and
    SharePoint list B   ex. 62c30e3c-ac15-451e-b9cc-32an23a92933
flow:
[pattern 1]
1. Set up a connection for SharePoint list A in "Open SQL connection"
2. In "Execute SQL Statement", "SELECT * FROM [62bd0e3c-ab50-449e-b9ac-32ba73a95713]" on SharePoint List A
3. Close the connection for SharePoint list A with "Close SQL connection"
4. Set the connection for SharePoint list B in "Open SQL connection"
5. In "Execute SQL Statement", "SELECT * FROM [62c30e3c-ac15-451e-b9cc-32an23a92933]" on SharePoint List B --> Error!!
6. Close the connection for SharePoint list B with "Close SQL connection"

[Pattern 2]
1. Set up a connection for SharePoint list B using "Open SQL connection"
2. In "Execute SQL Statement", "SELECT * FROM [62c30e3c-ac15-451e-b9cc-32an23a92933]" on SharePoint List B
3. Close the connection for SharePoint list B with "Close SQL connection"
4. Set the connection for SharePoint list A in "Open SQL connection"
5. In "Execute SQL Statement", "SELECT * FROM [62bd0e3c-ab50-449e-b9ac-32ba73a95713]" on SharePoint List A --> Error!!
6. Close the connection for SharePoint list A with "Close SQL connection"

 

I have the same question (0)
  • Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at

    Hi @sakamotoma 

     

    Can you share the error screenshot and the available tables in the database?

     

    Regards,

    Srini

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Are you sure you are using the correct %SQLConnection% variables in your Execute SQL statement actions? Perhaps you're always using the one created by the first Open SQL connection action (which you close after the first statement)? If your connection variables have different variable names, make sure you use the correct one in each Execute SQL statement action.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 245

#2
David_MA Profile Picture

David_MA 216 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 212

Last 30 days Overall leaderboard