Subject Re: [firebird-support] Master-Detail query help, please... :)
Author hobbit
> Greg At ACD escreveu:
>
> >First try:
> >
> >SELECT M.*
> >FROM TableMaster M
> > INNER JOIN TableChild C ON M.MID = C.MID
> >WHERE C.SomeValue IN (A, B)
>>
> What i'd rather do is to have DISTINCT work on a small amount of
> data (the MID), so I try something like this...


SELECT distinct(M.*)
FROM TableChild C
JOIN TableMaster M ON M.MID = C.MID
WHERE C.SomeValue IN (A, B)

HTH
Gary