Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Top N
Message
De
29/12/2005 02:31:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Re: Top N
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01081565
Message ID:
01081574
Vues:
8
>>>Hi everybody,
>>>
>>>I do SELECT TOP 2000 from ... order by ...
>>>but I get only 1999 accounts returned. Is it normal behavior of TOP N clause?
>>>
>>>Thanks in advance.
>>
>>Hello Nadya,
>>
>>According to the help, it would rather seem normal if you get MORE than the specified amount, in your case, if there is a tie between position 2000 and 2001.
>>
>>Perhaps some condition is applied after returning 2000 (or more) records, although I would expect a condition to be applied before selecting the top 2000, not after.
>>
>>Anyway, does your query include:
>>
>>
  • A WHERE clause?
    >>
  • A GROUP BY clause?
    >
    >It includes where (obviously), but no group by.

    We have to ask the obvious question - how many rows are returned if you have no TOP N clause at all? i.e. how many total rows meet the other conditions? < g >
    Regards. Al

    "Violence is the last refuge of the incompetent." -- Isaac Asimov
    "Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

    Neither a despot, nor a doormat, be

    Every app wants to be a database app when it grows up
  • Précédent
    Suivant
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform