MsLady
Traumatized by Access
- Local time
- Yesterday, 22:53
- Joined
- Jun 14, 2004
- Messages
- 438
The security table is made up of two primary keys: thing, personorgroup
When i run this statement to insert into the security table
I get this error:
Server: Msg 2627, Level 14, State 1, Line 25
Violation of PRIMARY KEY constraint 'PK_SECURITY'. Cannot insert duplicate key in object 'SECURITY'.
The statement has been terminated.
Anybody know how i can perform my insert successfully?
When i run this statement to insert into the security table
Code:
INSERT INTO security (thing, personorgroup, accessrights)
SELECT '252600649', '4020', '255'
FROM PROFILE
WHERE not exists(select * from security
where security.thing = '252600649' and security.personorgroup = '4020');
I get this error:
Server: Msg 2627, Level 14, State 1, Line 25
Violation of PRIMARY KEY constraint 'PK_SECURITY'. Cannot insert duplicate key in object 'SECURITY'.
The statement has been terminated.
Anybody know how i can perform my insert successfully?