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

 

  • Verified answer
    timl Profile Picture
    37,420 Super User 2026 Season 2 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard