Link to home
Start Free TrialLog in
Avatar of csePixelated
csePixelatedFlag for United States of America

asked on

INSERT INTO while IDENTITY_INSERT is set to OFF

I have the following - however when i try to run it i get "Cannot insert explicit value for identity column in table 'DAAutoReportsLimit' when IDENTITY_INSERT is set to OFF."
INSERT INTO DAAutoReportsLimit(ID, ID_AutoReport, Limit)
SELECT
  350163, ID_AutoReport, Limit
FROM
  DAAutoReportsLimit
WHERE
  ID = 349730

Open in new window

can i simply set IDENTITY_INSERT is set to ON- while my database is in use then turn it of once i have added my rows?
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial