Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select last 5 days in between
Message
From
21/08/2004 16:13:37
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00935195
Message ID:
00935230
Views:
23
Sergey,

SELECT TOP 5 dDate ;
FROM mytable ;
GROUP BY 1 ;
ORDER BY 1 DESC ;
INTO CURSOR crsDates

SELECT * ;
FROM mytable ;
WHERE dDate IN ( ;
SELECT dDate FROM crsDates)

In VFP9 it could be done in one query
SELECT * ;
FROM mytable ;
WHERE dDate IN ( ;
SELECT TOP 5 dDate ;
FROM mytable ;
GROUP BY 1 ;
ORDER BY 1 DESC )

from here
and how to separate the last query into 5 different groups of dates into 5 different cursors ? means each group of dates per cursor

TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform