Home Forums SQL Server 2014 Development - SQL Server 2014 Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint "fkInventory_TagAlongs". The conflict occurred in database "sanroqued", table "dbo.Inventory". RE: Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint "fkInventory_TagAlongs". The conflict occurred in database "sanroqued", table "dbo.Inventory".

  • It's pretty much what it says.  Your table has a foreign key constraint and your insert is violating that foreign key constraint. You have one or more records where the values you are inserting are not in the values for the corresponding fields in the referenced table.  You can find them by doing a LEFT JOIN of the tagalonglistsq to the referenced table on the key fields and finding records where the referenced fields are NULL.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA