Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select top 2 returns more than 2
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01498480
Message ID:
01498505
Views:
46
>I have following command:
>SELECT TOP 2 REP FROM MyTable ORDER BY REP
>
>However this returns 6 records.
>I was expecting just 2.
>Tia
>Gerard

Try breaking the tie with some additional criteria. If you're selecting from a single table, you can add RecNo() to your select to sort the result and use it to only select N records.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform