Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select last 5 days in between
Message
De
21/08/2004 16:13:37
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00935195
Message ID:
00935230
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform