Page 1 of 1

'or' in queries

Posted: 19 Jan 2010 15:42
by ltester
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

'or' in queries

Posted: 19 Jan 2010 17:24
by PeterR
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

'or' in queries

Posted: 19 Jan 2010 20:11
by ltester
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

'or' in queries

Posted: 20 Jan 2010 07:17
by Jane
Just a reminder in V4 you can also use OR AND etc, but you need to wrap them in functions.