John86a
asked on
The DELETE statement conflicted with the REFERENCE constraint....
Ran the command: DELETE FROM [dbo].[USERS]
Got the result:
Msg 547, Level 16, State 0, Line 2
The DELETE statement conflicted with the REFERENCE constraint "FK__Institute__cd_ca__541 767F8". The conflict occurred in database "Nova", table "dbo.Institute", column 'cd_userlist'.
The statement has been terminated.
How can I fix this? I need to delete the data inside the table USERS.
Got the result:
Msg 547, Level 16, State 0, Line 2
The DELETE statement conflicted with the REFERENCE constraint "FK__Institute__cd_ca__541
The statement has been terminated.
How can I fix this? I need to delete the data inside the table USERS.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great, thanks!
such that a user identified on the institute table must exist on the user table....
you need to resolve what you will do with the institute table rows for the users that you intend to delete first....
this type of constraint in "general" implies that it was not considered a "valid business process" to allow users once established to be removed... (there are lots of legal requirements in many jurisdictions which mean it becomes difficult to allow data to be removed , are you certain you are required/allowed to remove your user data?) you need to check with your business analysts as to what steps should be taken.