Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last 10 records based on a condition
Message
 
 
À
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:
00599308
Vues:
41
>>>>>>< 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.

No, with order by clause it will have to create result set first, order it and than pick TOP N records from it. The same way it works in VFP.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform