I have a sql table that I am trying to setup a foreign key to another table. This table does not have to have data in it, but if it does, it has 3 primary keys, and one of those primary keys is going to come from the ShipmentImportHeader table.
When I am trying to do the following:
ShipmentImportPackage ForeignKey = ShipmentImportHeaderID
This points to the ShipmentImportHeader table and the column ID.
When I try to do this, I keep getting the message:
The columns in table 'ShipmentImportHeader' do not match an existing primary key or unique contraint. Now, ShipmentImportHeader.ID is a primary key. Also, in the ShipmentImportPackage table, the primary key is ID, ShipmentImportHeaderID, PackageID. Now, I want the shipmentimportheaderid to be a foreign key to the ID field in the ShipmentImportHeader table.
I am not the best at sql, so this error does not mean too much to me. Any help would be appreciated.