Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If some detail does not match, through the header out
Message
De
19/01/2004 13:14:58
 
 
À
17/01/2004 05:42:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00867597
Message ID:
00868213
Vues:
22
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform