The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_ dbo.AbpUsers dbo.Locations LocationId". The conflict occurred in database "DancerMuse", table "dbo.Locations", column 'Id' code example
Example: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "". The conflict occurred in database "", table ", column
SELECT *
FROM [rpt].ReportLessonCompetency rlc
WHERE NOT EXISTS
(
SELECT 1
FROM [rpt].TraineeGrade tg
WHERE tg.Id = rlc.Grade
)