Ejemplo 1: sqlexception: la declaración de inserción entró en conflicto con la restricción de clave externa
In your table dbo.Sup_Item_Cat, it has a foreign key reference to another table. The way a FK works is it cannot have a value in that column that is not also in the primary key column of the referenced table.
If you have SQL Server Management Studio, open it up and sp_help 'dbo.Sup_Item_Cat'. See which column that FK is on, and which column of which table it references. You're inserting some bad data.
Let me know if you need anything explained better!
Ejemplo 2: La instrucción ALTER TABLE entró en conflicto con la restricción FOREIGN KEY “”. El conflicto ocurrió en la base de datos “”, tabla “, columna
SELECT *
FROM [rpt].ReportLessonCompetency rlc
WHERE NOT EXISTS
(
SELECT 1
FROM [rpt].TraineeGrade tg
WHERE tg.Id = rlc.Grade
)
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)