R
Rex
Hi,
I want to compare data in two different rows of a table. For eg. I have
a table called twins and each twin has a unique individual ID, for
instance twinA (first born twin) has an ID: 2 whereas twinB (second
born twin) has an ID: 3. both of these records belong to a particular
familyID.
Now I want to be able to compare if sex of both the twins are same or
different
The original table looks something like this:
FamilyID | individual_ID | Name | Sex
---------------------------------------------------------
000 | 02 | john | male
000 | 03 | kasey | female
222 | 02 | jack | male
222 | 03 | ryan | male
I want to have a calculated field which would look at the sex of each
twin belonging to a particular family and tell me where they are same
sex or not. so the new query would look something like this:
FamilyID | individual_ID | Name | Sex | sameSex
--------------------------------------------------------------------------------
000 | 02 | john | male | No
000 | 03 | kasey | female | No
222 | 02 | jack | male | Yes
222 | 03 | ryan | male | Yes
Thanks
Rex
I want to compare data in two different rows of a table. For eg. I have
a table called twins and each twin has a unique individual ID, for
instance twinA (first born twin) has an ID: 2 whereas twinB (second
born twin) has an ID: 3. both of these records belong to a particular
familyID.
Now I want to be able to compare if sex of both the twins are same or
different
The original table looks something like this:
FamilyID | individual_ID | Name | Sex
---------------------------------------------------------
000 | 02 | john | male
000 | 03 | kasey | female
222 | 02 | jack | male
222 | 03 | ryan | male
I want to have a calculated field which would look at the sex of each
twin belonging to a particular family and tell me where they are same
sex or not. so the new query would look something like this:
FamilyID | individual_ID | Name | Sex | sameSex
--------------------------------------------------------------------------------
000 | 02 | john | male | No
000 | 03 | kasey | female | No
222 | 02 | jack | male | Yes
222 | 03 | ryan | male | Yes
Thanks
Rex