Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 5.0 & 6.0 - Nested SELECT's
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00188396
Message ID:
00188453
Vues:
21
>Did you try combining the WHERE, as in my other message?
>
>
>SELECT * FROM CUSTOMER ;
> WHERE MAXORDAMT > 50000 AND ALLT(COUNTRY) = 'USA'
>

>
>Mark

Marks making a good point, his method will work, and be more efficient than a subquery, if MaxOrdAmt and Country are both fields in the Customer table.

From one of your posts, I got the impression that the table with MaxOrdAmt was called V1. If you're selecting records from one table based on their fitting with a subset of records from another table, you will need a subquery. If Customer is the only table your queries are dealing with, Mark's answer is best.

Cheers,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform