Problems with queries (x2)
Date: Mon, 2 Sep 2002 14:31:02 +0100
John Hanson wrote
>> I have included a line in the query to exclude people who died before 1901 ... but there are still some included. The query specifies only the year and not an exact date These appear to be people where the date shows as something like 'before 1881' which obviously means that I have found the family on the 1881 census and the persons spouse was shown as a widow(er). Is this a problem with the program??
John wanted to find all records for individuals who were alive in 1901, and consequently asked for everyone to be excluded who had died before 1901 or were born after it. The filter line he used, to excude individuals who had died before 1901, was:
Exclude if %INDI.DEAT.DATE:YEAR% was earlier than 1901
The problem here is the YEAR qualifier. It is not only not needed. It is actually stopping the query from giving what you want. If you change the filter to
Exclude if %INDI.DEAT.DATE% was earlier than 1901
it should work fine (the same change should be made to the birth line).
The reason that the YEAR qualifier stops this query from doing what you want is not really a program error. The YEAR qualifier gives an individual year value for dates that have them. But what is the year for a date that is specified as 'Before 1881'? Family Historian considers that there is no single year that corresponds to this. However, if you use a date qualifier in a filter, the filter is no longer making a comparison against the underlying date - it is making a comparison against the display value that you get for that date, using that qualifier. In this case, 'Before 1881' displays blank when you use the YEAR qualifier; and blank values are not considered to be less than or greater than anything.
Dave Pacey wrote
>> I am trying to create a query that returns all individuals with an entry for an event of the type Census. When I run the query, not all records are returned
Dave - are you using a filter like the following to get the records you want, in your query?
Exclude if %INDI.CENS% is null
If not, what are you using? Sometimes people prefer to create their own custom events for censuses. For example, you could create an event '1901 Census'. Have you done anything like that? Have you created a source record for the census? Is it possible that you have added some records linked to a census source record, but not created a census event for them?
Simon Orde List Administrator and Family Historian designer
* Problems with queries (x2)
Problems with queries (x2)
(Also posted to mailing list).
I've created the following custom query to list everyone in my database who should have been alive on a given date (e.g. 31 March 1901 for the census). The date is entered via a parameter ('Date'). According to the manual, if the same label is used for multiple parameters ('Date' in this case) it should not re-prompt for a value. But it does. In this case, I'm using 'Date' to filter (exclude) Rows on INDI.DEAT.DATE and INDI.BIRT.DATE, but also using it in the Columns to calculate the person's AgeAT the given 'Date'. FH prompts separately for all three occurrences of the parameter 'Date', whereas I would expect from the manual that it should only prompt once and use the same value in all three places.
Am I doing something wrong, am I misunderstanding the manual, or is this a bug in FH?
Also, is there any way of getting the value of 'Date' into the TITLE or SUBTITLE (e.g. 'Alive on 31 March 1901')??
Thanks
John James
THE QUERY (FHQ)
[Family Historian Query]
VERSION=1.0
TYPE=INDI
DESC=
Lists all those (for whom we have birth and/or death dates) who were alive
at a given date, and calculates their age at that date. Useful to see who
may have been included in a census, for example.
.
TITLE='Alive at given date'
SUBTITLE='%#x'
ORIENTATION=LANDSCAPE
TAG='Individual','INDI',,,185
TAG='Sex','INDI.SEX',,,65
TAG='Dates','=LifeDates()',,ASC,80
TAG='Age at Death','INDI.DEAT.DATE:AGE_AT'
TAG='Age at date','=AgeAt(%INDI%,[''Date''])'
FILTER=GEN,EXC,IF,Y,'Date','INDI.DEAT.DATE',,'',DATE,'31 MAR 1901'
FILTER=GEN,EXC,IF,N,'','INDI.DEAT.DATE',,'null'
----------------------------------------
I've created the following custom query to list everyone in my database who should have been alive on a given date (e.g. 31 March 1901 for the census). The date is entered via a parameter ('Date'). According to the manual, if the same label is used for multiple parameters ('Date' in this case) it should not re-prompt for a value. But it does. In this case, I'm using 'Date' to filter (exclude) Rows on INDI.DEAT.DATE and INDI.BIRT.DATE, but also using it in the Columns to calculate the person's AgeAT the given 'Date'. FH prompts separately for all three occurrences of the parameter 'Date', whereas I would expect from the manual that it should only prompt once and use the same value in all three places.
Am I doing something wrong, am I misunderstanding the manual, or is this a bug in FH?
Also, is there any way of getting the value of 'Date' into the TITLE or SUBTITLE (e.g. 'Alive on 31 March 1901')??
Thanks
John James
THE QUERY (FHQ)
[Family Historian Query]
VERSION=1.0
TYPE=INDI
DESC=
Lists all those (for whom we have birth and/or death dates) who were alive
at a given date, and calculates their age at that date. Useful to see who
may have been included in a census, for example.
.
TITLE='Alive at given date'
SUBTITLE='%#x'
ORIENTATION=LANDSCAPE
TAG='Individual','INDI',,,185
TAG='Sex','INDI.SEX',,,65
TAG='Dates','=LifeDates()',,ASC,80
TAG='Age at Death','INDI.DEAT.DATE:AGE_AT'
TAG='Age at date','=AgeAt(%INDI%,[''Date''])'
FILTER=GEN,EXC,IF,Y,'Date','INDI.DEAT.DATE',,'',DATE,'31 MAR 1901'
FILTER=GEN,EXC,IF,N,'','INDI.DEAT.DATE',,'null'
----------------------------------------