pitbullblonde
Technical User
I am creating a projects database. My first table (Projects) has a primary key of Id, an integer. My next table (Tasks) has a primary key of Id & Seq together, and a foreign key of Id, which references the Id in the projects table. This part works fine. The problem is in adding the third table (Items), which has a primary key of Id, Seq, & Iseq - together. I would like to create a foreign key of Id & Seq to refer back to the Tasks table primary key of Id & Seq but keep getting key not found. I've tried using only one field, but still get the error.
I was hoping to create the following relationships, but can't set the foreign key on the items table - I get Key not found.
Projects Id autoinc - primary key
Tasks Id integer - foreign key to Projects(Id)
Id, Seq integers - primary key
Items Id, Seq integers - foreign key to Tasks(Id,Seq)
Id, Seq, Iseq integers - primary key
Any and all input greatly appreciated!
I was hoping to create the following relationships, but can't set the foreign key on the items table - I get Key not found.
Projects Id autoinc - primary key
Tasks Id integer - foreign key to Projects(Id)
Id, Seq integers - primary key
Items Id, Seq integers - foreign key to Tasks(Id,Seq)
Id, Seq, Iseq integers - primary key
Any and all input greatly appreciated!