Walter,
AFAIK you cannot use more than one "distinct" in an SQL. So I meant that by "illegal". Maybe I'm overlooking something. If you can supply me a sample SQL working on any VFP sample tables with more than one distinct I'd be glad to use it :)
Thanks again
Cetin
>Cetin,
>
>What do you mean by illegal ? As far as I can see this should work. Where does this go wrong ? The distinct statement within the count should handle the recurance of the same row. Therefore the count statments counts the different PK in the child table.
>
>I'm glad you've found another solution, but i'm curious why this doesn't work for you.
>
>Walter,
>