Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT TOP is not standard
Message
From
01/05/2003 19:39:22
 
 
To
30/04/2003 11:02:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00783170
Message ID:
00783949
Views:
15
>Fabio,
>Unfortunately it's a known behaviour of 'Top N' in VFP :(
>A workaround like this would do :
>
>
>SELECT TOP 1 * from ctop ORDER BY 1 into cursor crsTemp nofilter
>If (_Tally > 1)
> Select * from crsTemp where Recno() <= 1 into cursor crsTemp
>endif
>
Cetin

You could just do this:
SELECT TOP 1 * from ctop ORDER BY 1 HAVING RECNO()<=1 into cursor crsTemp nofilter
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform