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 / Insert Value into IDEN...
Power Automate
Answered

Insert Value into IDENTITY Column in SQL Server

(0) ShareShare
ReportReport
Posted on by 763 Super User 2024 Season 1

I have several tables in Azure SQL that have Identity Columns.  I am migrating data from another source that has an Id column. I want to retain the column definition of Identity for SQL but I want to insert the values from the source into that identity column. I have Set IDENTITY_INSERT to ON for the necessary tables. But when I try and setup the Flow using "Insert a row (v2)", it doesn't show the Identity column at all.

I tried recreating the table without IDENTITY, added the Insert into flow, which then showed the column, then dropped and created the table again with IDENTITY enabled.  Now flow still had the column I needed but when I executed the flow SQL returned the error IDENTITY_INSERT needs to be on, when it already was.

 

Any thoughts on how to do this? Dropping and recreating only works once, with the tables empty, any updates after that will not function.

 

Here is the exact error I am getting:

NOTE: IDENTITY_INSERT is ON for the table I am performing the insert on.

sperry1625_0-1644432861426.png

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    sperry1625 Profile Picture
    763 Super User 2024 Season 1 on at

    I resolved this by creating a Stored Procedure that turns the IDENTITY_INSERT ON/OFF as needed to perform the updates.

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

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard