Re: How to find Brothers and Sisters?

From: Neo <>
Date: 2 Dec 2006 09:19:41 -0800
Message-ID: <>

> Just for sisters...
> select,
> from person P2 inner join link on = link.parent
> inner join (select id from link inner join person P1
> on child = where = 'John') B
> on =
> where <> 'John'
> and'Female'

When I try to run the above query in Access, I get the following message: "Syntax error (missing operator) in query expression = link.parent inner join .... ="

What am I doing wrong? Below is the query for john's sisters that executes ok.

FROM ((person INNER JOIN link ON = link.child) INNER JOIN link AS link2 ON link.parent = link2.parent) INNER JOIN person AS P2 ON link2.child = WHERE (((<>"John")

              AND (("John")
              AND (("Female"));

id	name	sex
1	Adam	Male
2	John	Male
3	Jack	Male
4	Mary	Female

parent	child
Adam	John
Adam	Jack
Adam	Mary
Received on Sat Dec 02 2006 - 18:19:41 CET

Original text of this message