Link to home
Start Free TrialLog in
Avatar of wdbates
wdbatesFlag for United States of America

asked on

There are no primary or candidate keys in the referenced table

Hello Experts;

It's getting late and my brain is fried.  Help me with this error:

--Msg 1776, Level 16, State 0, Line 2
--There are no primary or candidate keys in the referenced table 'CMAS.JTA_Task_Competencies' that match the referencing column list in the foreign key 'FK_Competencies_iCompID'.
--Msg 1750, Level 16, State 0, Line 2
--Could not create constraint. See previous errors.

The attached file contains the Alter Statement and table structures.
BullDog.sql
ASKER CERTIFIED SOLUTION
Avatar of Anoo S Pillai
Anoo S Pillai
Flag of India 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
Avatar of wdbates

ASKER

I had it backwards, thank you for pointing it out.