cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ysharma
Frequent Visitor

Inserting multiple rows in SQL Server table

Hello All - 

I am trying to insert multiple rows into a sql server table, I see the current action is only capable of inserting one row at a time. Is there a way we can insert multiple rows into the sql server table? Please feel free to throw in any idea.

Thank you.

4 REPLIES 4
gabibalaban
Dual Super User
Dual Super User

@ysharma ,

There is no action in Power Automate to insert multiple rows into SQL Table, but you can do it by using Apply to each action with the concurrency option set as you need (maximum 50) and inside Apply to each action the SQL - Insert Row (V2) action.

 

gabibalaban_0-1638428215243.png

Hope it helps !

Hi @gabibalaban ,
Thank you so much for your response. I tried to put the "Insert row" action with in "Apply to each" and set the concurrency, but I am not sure what array to put here:

ysharma_0-1638451937301.png

When I put body from previous step I am getting the below error, and getting the same error when I am putting id from previous table.

ysharma_1-1638451989948.png

Thank you again for helping me out.

Hvus
Advocate I
Advocate I

Hi!

Did you try to use bulk insert instead insert into?  This is the fast method to masive insertion.

Hope this help.

@ysharma ,

Based on your screen-shot, for each created item in table 1 an instance of the flow runs and creates a row in table 2. 

I can't figure it out what multiple rows do you want to insert in the second table. The body property of the trigger SQL - when an item is created is an object (the columns values of the created item) , not an array, so you cannot use Apply_to_each action in this case.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,809)