OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[Solved]Building a pedigree database - what am I doing wrong

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
Hezza1506
General User
General User


Joined: 13 Jan 2009
Posts: 32
Location: Scotland

PostPosted: Tue Jan 13, 2009 10:49 am    Post subject: [Solved]Building a pedigree database - what am I doing wrong Reply with quote

I am just starting out breeding cats, and am trying to build a database to keep track of the pedigrees of my own cats and the studs that I take them to, etc.

I have set up two tables at present: one with the details of each cat (prefix, name, breed number, colour etc.), and a second one to enter which cats are the parents of each cat. In the 1st table the key field is CatID, which is a unique ID assigned to each cat. I need some way to link each CatID to the CatID for each of its parents.

To give an example of the sort of information:

Table 1:
CatID: AdfuKenn1
CatPrefix: Adfurbu
CatName: Kennbury Tehraz
CatID: AdmePrud1
CatPrefix: Admewbu
CatName: Prudence Primrose
CatID: AdquGrat1
CatPrefix: Adquash
CatName: Grathors Demelza

Say that Admewbu Prudence Primrose and Adquash Grathors Demelza are the sire and dam of Adfurbu Kennbury Tehraz. I need some way to link these, so that I can tell the database that the sire of AdfuKenn1 is AdmePrud1, and the dam is AdquGrat1.

I tried having a second table with
ID, CatID, SireCatID and DamCatID, but I couldn't then figure out how to tie those to the CatIDs in the other table. I thought I had managed and entered about 20 cats, but when I ran a report on it, I just got each CatID 20 times with the SireCatID showing every other cat.

Obviously, the end goal would be able to produce a report showing that the parents of Adfurbu Kennbury Tehraz are Admewbu Prudence Primrose and Adquash Grathors Demelza; and that the parents of Adfurbu Kennbury Tehraz are Cilipepper Inyanga Floyd and Chilipepper Sweet Sasafras, while the parents of Admewbu Prudence Primrose are Creamcounty Empire Star and Creamcounty Kennbury Bizet, etc.

I've tried reading the various tutorials that look relevant, but I'm just getting myself tied in knots.

Any suggestions?

Thanks in advance,

Hezza


Last edited by Hezza1506 on Tue Jan 27, 2009 12:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hezza1506
General User
General User


Joined: 13 Jan 2009
Posts: 32
Location: Scotland

PostPosted: Tue Jan 27, 2009 12:17 pm    Post subject: Solution Reply with quote

For anyone else having the same problem, I hadn't told the query to match the CatID in one table to the CatID in the other table. I had to add into my query the following code:

WHERE "CatInfo"."CatID" = "Matings"."CatID"

This now works!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group