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 Apps / Deleting records from ...
Power Apps
Answered

Deleting records from on prem database from Power Automate

(0) ShareShare
ReportReport
Posted on by 53

Hi,

 

I'm currently creating a Flow in Power Automate that queries the Account entity in Dynamics CRM (Cloud) and inserts it to an on prem SQL database. I was able to get the flow to insert the records to the correct table, but I want the flow to delete all the records in the table beforehand. (in an SSIS package, a SQL query like "DELETE table" would be executed before importing).

 

I was wondering how do I do this with Power Automate?

 

Sincerely,

 

Jason

 

I have the same question (0)
  • Verified answer
    timl Profile Picture
    37,188 Super User 2026 Season 1 on at

    Hi @JasonYeung 

    I guess the reason why you're asking this question is because the 'Execute a SQL Query' action isn't supported with on premise databases.

    https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Support-quot-Execute-a-SQL-query-quot-action-through-an-on/idi-p/236400

    The workaround is to create a SQL Stored procedure that deletes the data from your table. You can then call this stored procedure from your Flow.

  • Jason Yeung Profile Picture
    53 on at

    Hi @timl ,

     

    Thanks for your help. The stored procedure worked.

     

    Sincerely,

     

    Jason

  • oscar_bolanos Profile Picture
    13 on at

    Hi,

     

    I have created a SQL Stored procedure (on-premise) to delete the data from my table, however, the store procedure "sp_deleteTable" isn't shown within the "procedure name" dropdown (as is shown in the image attached).

     

    Do you have any idea??1.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 428

#2
Haque Profile Picture

Haque 338

#3
timl Profile Picture

timl 333 Super User 2026 Season 1

Last 30 days Overall leaderboard