Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sub Query anyone?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00253101
Message ID:
00253171
Views:
16
Getting back to the question at hand sub querys:

This is SQL 92 syntax:

SELECT S1.symbol, ;
MAX(S1.high_price) AS highest_price,;
MIN(S1.low_price) AS lowest_price,;
(SELECT S2.close_price ;
FROM StockDetail AS S2;
WHERE S1.symbol = S2.symbol;
AND S2.close_date = MAX(S1.close_date));
AS last_close_price,;
MAX(S1.close_date) AS last_date ;
FROM StockDetail AS S1;
GROUP BY S1.symbol;

But it wont compile in VFP! You gather some fields, add a select statments fields, and your done. Worse, this is an Access answer that does work in Access. ";" added for VFP.
Previous
Reply
Map
View

Click here to load this message in the networking platform