>>>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