* Queries

Homeless Posts from the old forum system
Locked
avatar
mikegscoles
Diamond
Posts: 66
Joined: 01 Sep 2006 21:27
Family Historian: V6.1

Queries

Post by mikegscoles » 13 Aug 2011 23:33

Can anyone help me with the following query to assist me with finding marriages. I am not very good with complex queries!

DISPLAY:
        1.Individuals with a specific surname
        2.Individuals who have no marriage recorded
        3.Probable earliest marriage date (say 15 yrs after  birth)  
        4.Probable latest marriage date (say 60 yrs of age)
        5.Census place (if known) for nearest census before earliest marriage date and for each census year up to latest marriage date

EXCLUDE:
        1.Individuals who have a death date or whose estimated death date is before earliest marriage date
        2.Individuals whose earliest marriage date is later than today

Thanks

Mike

ID:5379

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Queries

Post by Jane » 14 Aug 2011 20:40

I am looking at this one, can any one spot the mistake in this expression please:

=numberif(exists(%INDI.DEAT.DATE:YEAR%),numberif((%INDI.DEAT.DATE:YEAR% < calc(%INDI.BIRT.DATE:YEAR% + 65)),%INDI.DEAT.DATE:YEAR%),calc(%INDI.BIRT.DATE:YEAR% + 65))


Mike the best I can do for the Census is to show the dates range and any Censuses for the person listed.

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Queries

Post by PeterR » 14 Aug 2011 22:30

I managed the following expression for probable latest marriage year:

Code: Select all

=NumberIf(Year(EstimatedDeathDate(%INDI%,LATEST,9)) > Calc(Year(EstimatedBirthDate(%INDI%,LATEST,9)) + 60),
Calc(Year(EstimatedBirthDate(%INDI%,LATEST,9)) + 60),Year(EstimatedDeathDate(%INDI%,LATEST,9)))
I have almost finished a query which does most of what was asked, and I'll upload it to the Query Store when finished.

Edit: I've now uploaded the query Marriage Not Found.

avatar
mikegscoles
Diamond
Posts: 66
Joined: 01 Sep 2006 21:27
Family Historian: V6.1

Queries

Post by mikegscoles » 16 Aug 2011 20:30

Thank you so much Jane and Peter for your help.

Queries are so useful and powerful and solutions such as those made available for upload help in my understanding of how they work. Still a lot of learning to go though.

Thanks again

Mike

Locked