Re: SELECT TOP

From: Eric den Doop (ericdendoop_at_xspamblockxfoxite.com)
Date: 03/09/04


Date: Tue, 9 Mar 2004 14:34:48 +0100

Hello, Kezia!

No this is not a bug. It's design and documented in VFP Help on "SELECT -
SQL":
<vfp_help>
TOP nExpr [PERCENT]
Specifies that the query result contains a specific number of rows or a
percentage of rows in the query result. You must include an ORDER BY clause
when you include the TOP clause. The ORDER BY clause specifies the columns
on which the TOP clause determines the number of rows to include in the
query result.
You can specify from 1 to 32,767 rows. Rows with identical values for the
columns specified in the ORDER BY clause are included in the query result.
Therefore, if you specify 10 for nExpr, the query result can contain more
than 10 rows if there are more than 10 rows with identical values for the
columns specified in the ORDER BY clause.
</vfp_help>

-- 
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8


Relevant Pages

  • RE: Any good T-SQL quick reference recommended?
    ... The full syntax of the SELECT ... SELECT Clause ... Specifies the columns to be returned by the query. ... Specifies that duplicate rows can appear in the result set. ...
    (microsoft.public.sqlserver.programming)
  • Return Hierarchical Data From One Table (with a JOIN to a second table)
    ... I would appreciate help in designing an efficient query that will retrieve ... [SequenceInRank] ... - specifies which row is the logical parent of the ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL SELECT TOP question
    ... Specifies that only the first n rows are to be output from the query result ... rows) ordered by the ORDER BY clause are output. ... "Brad" wrote in message ...
    (microsoft.public.dotnet.languages.vb)
  • Re: problem with IWbemService.ExecNotificationQuery()
    ... > Notification or Asyn.Notification query. ... > specifies a class that does not exist. ... > requests more information than Windows Management can reasonably provide. ... > an event query results in a request to poll all objects in a namespace. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: top n problem
    ... >to be output from the query result set. ... >ordered by the ORDER BY clause are output. ... >Specifies that additional rows be returned ... does not mean UNION without ALL is undefined. ...
    (microsoft.public.sqlserver.programming)