* Query help please!

Homeless Posts from the old forum system
Locked
avatar
billor
Platinum
Posts: 33
Joined: 27 Sep 2007 15:27
Family Historian: V6
Location: East Sussex
Contact:

Query help please!

Post by billor » 19 Jan 2010 17:39

I use queries so infrequently that I always fail to get them to work!
I am currently adding 1911 census entries and want to make sure that I have not missed anyone in my file who was alive in 1911.
I have started with the 'Alive' query from the Query store so that I can list everyone alive in 1911. That was fine to start with but now I want to add an exclusion - to exclude everyone who already has a 1911 census event recorded.
I have added a row which says
Exclude if %INDI.CENS.DATE:YEAR% was on ['Date']
where Date is the same parameter used for the Alive query. However this doesn't work as, I'm assuming, there are multiple census year records in the file.
Please can someone suggest how my exclusion should really be written?
Thanks,
Bill

ID:4293

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

Query help please!

Post by PeterR » 19 Jan 2010 18:38

Bill,
Try the following exclusion filter:

Code: Select all

Exclude unless %INDI.CENS[year=1911]% is null

avatar
billor
Platinum
Posts: 33
Joined: 27 Sep 2007 15:27
Family Historian: V6
Location: East Sussex
Contact:

Query help please!

Post by billor » 20 Jan 2010 07:58

Peter,
Thanks for the suggestion but it doesn't seem to quite do it. I am still getting some hits where there is defintiely a 1911 census record for that person.

I've also tried
Exclude if %INDI.CENS[1].DATE% was on 2 APR 1911
but that doesn't seem to exclude them all either.

I can work with the list but it's just a bit annoying that I don't understand enough about the search system to get it to work properly!
Thanks,
Bill

avatar
billor
Platinum
Posts: 33
Joined: 27 Sep 2007 15:27
Family Historian: V6
Location: East Sussex
Contact:

Query help please!

Post by billor » 20 Jan 2010 08:01

Peter,
OK - so I just tried it again and your code works fine!! I think I must have missed the 'unless' last time!
Thanks,
Bill

Locked