Jump to content

How to insert into table from same table ?


NewEra13

Recommended Posts

Hello,

 

I need to fake data in our development table by creating new row with a new EntityID = 100 but that could have all other data as the same as for EntityID = 99 for example.

 

Msg 2627, Level 14, State 1, Line 2

Violation of PRIMARY KEY constraint 'XPK_FactTable'. Cannot insert duplicate key in object 'DataBase.FactTable'.

The statement has been terminated.

 

 

Thanks !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...