Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT TOP is not standard
Message
 
 
To
30/04/2003 10:52:16
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00783170
Message ID:
00783185
Views:
16
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform