Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT TOP is not standard
Message
 
 
À
30/04/2003 10:52:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00783170
Message ID:
00783185
Vues:
17
Hi Fabio,

In your case you can use GROUP BY to eliminate duplicates
SELECT TOP 1 * ;
	FROM ctop ;
	GROUP BY 1 ;
	ORDER BY 1 
>Hi
>
>CREATE CURSOR ctop (dato I)
>INSERT INTO ctop values(1)
>INSERT INTO ctop values(1)
>INSERT INTO ctop values(1)
>
>SELECT TOP 1 * from ctop ORDER BY 1
>
>You have 3 row.
>
>Help document ( badly ) this behaviour.
>
>Exact behaviour is:
>With TOP N (< =32,767) clause, query return N rows plus all the residual rows of the last equal group defined by ORDER clause.
>
>Question:
>
>Can replay MSQL TOP N behaviour, for N< =32,767, with one single SELECT command ?
>If not exists, which it is the best VFP sequence commandos for do it ?
>
>Fabio
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform