Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5.0 & 6.0 - Nested SELECT's
Message
 
To
17/02/1999 10:39:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00188396
Message ID:
00188455
Views:
22
>These two lines run fine if I run one after the other.
>
>SELECT * FROM V1 WHERE MAXORDAMT > 50000
>
>SELECT * FROM CUSTOMER WHERE ALLT(COUNTRY) = 'USA'
>
>If I try to nest them, they don't run, what am I doing wrong?
>SELECT * FROM CUSTOMER ;
> WHERE MAXORDAMT > 50000 AND ;
> (SELECT * FROM CUSTOMER WHERE ALLT(COUNTRY) = 'USA')

If this posting has the correct table names in the first two SELECT commands, here's the syntax for the subquery:
SELECT * FROM CUSTOMER ;
	WHERE ALLT(COUNTRY) = 'USA' ;
	AND CustKey IN (SELECT CustKey FROM V1 WHERE MAXORDAMT > 50000)
HTH,
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
Next
Reply
Map
View

Click here to load this message in the networking platform