Problems with queries (x2)
Posted: 17 Nov 2002 08:55
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
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