>Caroline,
>
>sorry, I should have read your message more carefully, to see what you mean exactly.
>
>How about this one:
>
>
>Select Exhibit.iid, Exhibit.nkey, Links.* ;
>
> FROM Exhibit ;
>
> LEFT JOIN Links ;
> ON Exhibit.iid = Links.iwork ;
>
> WHERE Links.itype in (1,0) OR Links.itype IS NULL ;
> GROUP BY Exhibit.iid, links.iwork;
> INTO CURSOR Linked
>
>
>Here we get ...
>- all records from exhibit joined with all records from links which are of type 1 or 0 and all records from exhibit that don't have a record in links.
>- then group the result, so we get a resulting record per exhibit.iid/links.iwork
>
>Am I getting closer to what you want or am I still missing something?
>
>Armin
Thanks Armin that seems to do what I wanted.
Would you know if there is a way to force the group by to return say records of type 1 if the pre Group By result holds both a type 1 and a type 0?
Caroline