Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

facebook Twitter
Email
Print Bookmark Alert me when this article is updated

Feedback

HOW TO: Insert data into a SQL Server table that has an identity column
Solution
A user generally cannot insert a value into an identity column.​

​This can be achieved using the below-mentioned query in the Connection Environment SQL attribute in the SQL server connection:

SET IDENTITY_INSERT [ [ database_name . ] schema_name . ] table_name { ON | OFF }

 

For example, SET IDENTITY_INSERT support.c02496993.new_employees ON;


saransh1.PNG 

 



saransh2.PNG 

 


​​

More Information

The identity column of a table is a column whose value increases automatically. The value in an identity column is created by the server.

A user generally cannot insert a value into an identity column.

 

At any time, only one table in a session can have the IDENTITY_INSERT property set to ON. 


Reference
Applies To
Product: PowerCenter
Problem Type: Configuration
User Type: Developer
Project Phase: Configure
Product Version:
Database:
Operating System:
Other Software:
Attachments
Last Modified Date:1/14/2020 2:04 AMID:609022
People who viewed this also viewed

Feedback

Did this KB document help you?



What can we do to improve this information (2000 or fewer characters)