* 'or' in queries

Older V3 Queries please post for any version in the General Forum
Locked
avatar
ltester
Gold
Posts: 17
Joined: 19 Jan 2010 15:37
Family Historian: V7

'or' in queries

Post by ltester » 19 Jan 2010 15:42

I'm trying to write a query to find children who haven't got a birthdate but who have parents that do have a birthdate. How do I say - 'include if the mother or the father has a birthdate'? I seem to be only able to include one or both, not either/or.

Thanks
Louise

ID:4292

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

'or' in queries

Post by PeterR » 19 Jan 2010 17:24

I would do this using the following three filters:

Code: Select all

Add unless %INDI.~FATH[1]>BIRT[1].DATE% is null
Add unless %INDI.~MOTH[1]>BIRT[1].DATE% is null
Exclude unless %INDI.BIRT[1].DATE% is null
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

avatar
ltester
Gold
Posts: 17
Joined: 19 Jan 2010 15:37
Family Historian: V7

'or' in queries

Post by ltester » 19 Jan 2010 20:11

Thanks Peter, but that doesn't quite work how I want it to - but you've set me down the right path and I think I've cracked it now.
Thanks again
Louise

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

'or' in queries

Post by Jane » 20 Jan 2010 07:17

Just a reminder in V4 you can also use OR AND etc, but you need to wrap them in functions.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

Locked