SQL Server Error Msg 4974 – ALTER TABLE SWITCH statement failed. Foreign key constraint ‘%.*ls’ is NOCHECK in source table ‘%.*ls’ and the corresponding constraint ‘%.*ls’ is CHECK in target table ‘%.*ls’.  The source table constraint must be in CHECK.

In this blog post, let’s learn about the error message “4974 – ALTER TABLE SWITCH statement failed. Foreign key constraint ‘%.*ls’ is NOCHECK in source table ‘%.*ls’ and the corresponding constraint ‘%.*ls’ is CHECK in target table ‘%.*ls’.  The source table constraint must be in CHECK.” in Microsoft SQL Server, the reason why it appears and the solution to fix it.

SQL Server Error Message

4974 – ALTER TABLE SWITCH statement failed. Foreign key constraint ‘%.*ls’ is NOCHECK in source table ‘%.*ls’ and the corresponding constraint ‘%.*ls’ is CHECK in target table ‘%.*ls’.  The source table constraint must be in CHECK.

Reason for the Error

To be update soon…

Solution

To be update soon…