General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only