Page 1 of 1
Query for lost persons
Posted: 03 Jan 2019 15:18
by kcuypers
Hello,
I want to make a query for lost persons in my database, where no data is attach. (no witness,godparent,facts...).
Can someone help me please with this query?
Thanks
Greetings
Koenraad
Re: Query for lost persons
Posted: 03 Jan 2019 16:25
by tatewise
That is surprisingly difficult because it involves a Rows tab filter for EVERY possible tag including every Fact.
e.g.
Exclude unless %INDI.FAMS[1]>% is null
Exclude unless %INDI.FAMC[1]>% is null
and so on for every tag such as _SHAR, NOTE2, NOTE, REFN, BIRT, DEAT, MARR, etc, etc...
Maybe somebody else has a good idea.
Re: Query for lost persons
Posted: 03 Jan 2019 16:57
by David2416
I wonder if looking at pool numbers would help. Would such people be in their own pool?
Re: Query for lost persons
Posted: 03 Jan 2019 18:02
by PeterR
A possible solution requires two queries. First run a Fact query, for all facts, with the Fact-Owner (e.g. =GetRecord()) as the only column, and select all rows in the result set and Add Selected Cell Records to Named List…. Then use an Individual query with row conditions to Add Unless… in this Named List and to Exclude unless… e.g. %INDI.~SHAR[1]>% is null.
Re: Query for lost persons
Posted: 03 Jan 2019 19:43
by tatewise
That is a great idea, and I have discovered a
Query called
Non-Blank Individuals that does the inverse of the second part.
Its
General tab says:
Adds every Individual from a Named List that identifies Individuals with Facts.
Adds every Individual that has Family links or is a Witness.
Use the Menu option to 'Run and Invert Result Set' to obtain blank Individuals.
So the process is as Peter says, to first run a
Fact query to find all
Individuals with any
Facts.
Then select all the
Owner cells and use
Query Menu > Add Selected Cell Records to Named List….
Now run
Non-Blank Individuals and select that
Named List.
The
Result Set will now list every
non-blank Individual.
But using
Query Menu > Run and Invert Result Set will list every
blank Individual.
There is one caveat.
Those blank
Individuals may still be the target for one of the following links
from another record:
Associated Person (
INDI.ASSO)
Alias (
INDI.ALIA)
Re: Query for lost persons
Posted: 05 Jan 2019 11:46
by kcuypers
It's working. Thanks to all
Greetings
Koenraad