Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last 10 records based on a condition
Message
De
31/12/2001 00:02:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00599284
Message ID:
00599306
Vues:
35
>>>>>< snip >
>>>>>>
>>>>>>It'd be nice if SELECT FIRST 10 would be supported as well as SELECT LAST 10.
>>>>>
>>>>>Isn't SELECT TOP 10 the same as SELECT FIRST 10 ?
>>>>
>>>>Yes, I was mostly making reference to the SQL Server syntax.
>>>>
>>>>I had the assumption that the SQL syntax, supported on SQL Server, was grabbing the first records which were meeting the condition without having to select from the entire table first.
>>>
>>>Yes, you are right. In SQL Server it works the way you discribed if there is no Order By clause.
>>
>>So, if there is an order by clause in SQL Server, the result will be fast as it doesn't have to extract from the entire table. Which in VFP, is not supported, right?
>
>Do you mean 'if there is no ORDER BY clause in SQL Server, the result will be fast'? Yes, in this case Sql Server will just return TOP N records w/o processing of whole table.

I mean with an order clause and a condition.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform