Hello Fabio
Thank you for your reply, sergey had the correct answer. please see my reply to him. you solution (i believe) would come up also with orders which have 1 part matching and 1 part not matching the criteria.
Thanks for your help!
>Hi Gunnar,
>
>>>>>>>>>>>>
>i've got 2 tables: sales order header (comast) and sales order detail (codet). i would like to display only sales orders where ALL of the details match certain criteria.
>
>get the list of sales order header
>
>SELECT PrimaryKey FROM MasterTable ;
> WHERE NOT EXISTS (SELECT * FROM ChildTable WHERE <ChildTable join MasterTable> AND NOT <Criteria>)
>
>* a specific example
>SELECT orderId FROM comast ;
> WHERE NOT EXISTS (SELECT * FROM codet WHERE codet.orderId=comast.orderId AND NOT <Criteria>)
>
>Now use this list for show/filter ...
>
><snip>
>
>FABIO