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 / Execute SQL (Desktop) ...
Power Automate
Unanswered

Execute SQL (Desktop) Parameter 'SQL statement': Syntax error. - Runs in SSMS and Power Query

(1) ShareShare
ReportReport
Posted on by 10

Trying out Execute SQL statement for that runs in SSMS and Power Query; however, throws a syntax error when put into Automate desktop.

 

General Format:

 

Common table expression

 

SELECT / INTO;

SELECT / INTO;

 

Common table expressions

 

SELECT; (Uses temporary tables created by INTO)

 

Any ideas how to reformat so that it doesn't throw Syntax error?  It's incredibly frustrating.

 

  • rharmon1 Profile Picture
    10 on at

    Hello - found the problem.  Modulus '%' throws the error.

  • CesarRamirez Profile Picture
    71 on at

    In SSMS you need:

    - Activate "SQL Server and Window Authentication mode"

    - Create a user with all permissions, it must be used to create connection en PAD. NO use the same user "Window Authentication mode"

    CesarRamirez_0-1624470329679.png

     

    Maybe, check the Sql Server Configuration Manager:

    - TCP/IP status must be Enabled

    CesarRamirez_1-1624470396683.png

    And the SQL Services should be like this:

    - SQLEXPRESS: Running

    - SQL Server Agent: Automatic

    - SQL Server Browser: Running

    CesarRamirez_2-1624470681301.png

     

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard