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_Competencie
s' 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.