Forum

Forum breadcrumbs - You are here:ForumGeneral: Chit-chatList of Twins et al
Please or Register to create posts and topics.

List of Twins et al

This query was prompted by this post by ttri in the Community Forum that responded to a Topic started by @kevync a couple of months earlier. After debugging ttri's script (it wasn't enclosed in code tags and got corrupted), on running it gave me bogus results because of individuals having alternate Birth events on the same date. That got me to  thinking how to get only twins and I came up with a very different strategy that returns  only the 17 genuine pairings out of the 83 initially. My query does not check for witnesses of the birth event as does ttri's but that can easily be added.

Sample results:

RIN1Given1SurnameGiven2RIN2Born
92OrrillaFitchettRosetta93D.+18391224..+00000000..
163Florence OrillaAnnisLouise Wilma169D.+18920000..+00000000..
184VictorHoldenRoyal185D.+18990524..+00000000..

The script is attached.

Uploaded files:
kevync has reacted to this post.
kevync

Quite cool and thank you for thinking of me! ( had 98 rows)

I will add that to my SQL Create qry group to work as know I only tagged about 20 of those probably.

 

Tom Holden has reacted to this post.
Tom Holden

Very elegant.

RM needs to add the capability of running these kinds of queries in behalf of its users.

Tom Holden and kevync have reacted to this post.
Tom Holdenkevync

Tom: Nice code. In my database, I have an event type of "Alt Birth" so didn't think about checking for the multiple "birth" events.

I've attached my modified code to exclude those records that have a shared birth event, which in the case of my database means that I've already defined the twin relationship. This allows me to run the script and identify those twins that I need to fix.

Uploaded files:

Thanks @ttri. Your original query did identify the issue that my test database does have same-dated Birth events for an individual for quite a few people which would warrant attention for cleanup in a production database if there is no good reason to keep them, such as evidence pointing to two different Birth places.

I may have to retract or modify my statement that it would be easy to take into account witnesses of the Birth event. Your revision of my script removes twins when one of them is a witness to any event. To be precise, it would have to filter out only if a twin has a witness role of "twin" to another person's Birth event. That's a bit more complicated and because the RoleID for the "twin" role varies with database, it has to be looked up in the RoleTable. Then there's the consideration of triplets, quadruplets, ... So it's not so easy...

You're exactly right that the "twin" role would likely be different in each user's database. I think that this is one of those situations where the query has to be adjusted for how the user is using database. But your script does at least identify those children with same birth date and same parents. From there it's up to the user.

BTW, Thanks for maintaining your site for all us RM users!

RM needs to add the capability of running these kinds of queries in behalf of its users. (JerryByan)

agreed -- Not sure how many user have Work with Family Historian -- it had some powerful query language -- though  somewhat had to learn all  it potential.

At least with RM10 -- it was a huge leap. ( I was not with RM prior to ver 7). Imagine long time users really appreciated it . My need for SQL was greatly reduced - but there are many things "has source" but NOT  "has media" would be nice.