H
Hlarkin
I am trying to build a inbreeding query. The basis of this is that I need to
find dog's in a certain pedigree that have the same ID number
Below is just PART of a pedigree query. Much more is involved.
SELECT tblDOG.ID, tblDOG.name AS dogname, sire.ID AS sireid, sire.name AS
sname, dam.ID AS damid, dam.name AS dname, ssire.ID AS ssireid, ssire.name AS
ssname, sdam.ID AS sdamid, sdam.name AS sdname
FROM (((tblDOG LEFT JOIN tblDOG AS sire ON tblDOG.sireID = sire.ID) LEFT
JOIN tblDOG AS dam ON tblDOG.damID = dam.ID) LEFT JOIN tblDOG AS ssire ON
sire.sireID = ssire.ID) LEFT JOIN tblDOG AS sdam ON sire.damID = sdam.ID
WHERE (((tblDOG.ID)=1));
The dog's id is 1 this is the pedigree of a certain dog. Now I want to find
all the dog's in this pedigree that have matching ID numbers. Basically if
sireid = 10 and ssireid = 10 I want to know.
OR if I could list all the dog's in another table and then find the dog's
that are related from there.
I am not sure how to accomplish this. I have tried to create a new table,
but because of the WHERE (((tblDOG.ID)=1)) I still get the repeated pedigree.
I think I am setting this up wrong.
find dog's in a certain pedigree that have the same ID number
Below is just PART of a pedigree query. Much more is involved.
SELECT tblDOG.ID, tblDOG.name AS dogname, sire.ID AS sireid, sire.name AS
sname, dam.ID AS damid, dam.name AS dname, ssire.ID AS ssireid, ssire.name AS
ssname, sdam.ID AS sdamid, sdam.name AS sdname
FROM (((tblDOG LEFT JOIN tblDOG AS sire ON tblDOG.sireID = sire.ID) LEFT
JOIN tblDOG AS dam ON tblDOG.damID = dam.ID) LEFT JOIN tblDOG AS ssire ON
sire.sireID = ssire.ID) LEFT JOIN tblDOG AS sdam ON sire.damID = sdam.ID
WHERE (((tblDOG.ID)=1));
The dog's id is 1 this is the pedigree of a certain dog. Now I want to find
all the dog's in this pedigree that have matching ID numbers. Basically if
sireid = 10 and ssireid = 10 I want to know.
OR if I could list all the dog's in another table and then find the dog's
that are related from there.
I am not sure how to accomplish this. I have tried to create a new table,
but because of the WHERE (((tblDOG.ID)=1)) I still get the repeated pedigree.
I think I am setting this up wrong.