Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5.0 & 6.0 - Nested SELECT's
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00188396
Message ID:
00188453
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform