Microsoft KB Archive/308763

= FIX: TOP_N_BY_RANK Argument May Not Return Top N by Rank =

Article ID: 308763

Article Last Modified on 10/17/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q308763



BUG #: 354211 (Shiloh_bugs)



SYMPTOMS
If you use the TOP_N_BY_RANK argument in a full-text query, an incorrect result set may return. The inconsistency in the incorrect result set may be that a row that should return because of it's rank does not return. For example, if you use the following full-text query to query table A: select [key], rank from containstable (A, full_text_column, 'beef') the following result set may return: key        rank --- --- 2          64 23          85 85          49 97          44 1           56 If you now execute the following full-text query, which uses the TOP_BY_N_RANK argument, against the same table in the same database: select [key], rank from containstable (A, full_text_column, 'beef', 3) the following incorrect result set may return: key        rank --- --- 23         85 2           64 85          49

The preceding result set is incorrect because the following row did not return: key        rank --- --- 1          56



RESOLUTION
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack



STATUS
Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.



MORE INFORMATION
You use the TOP_N_BY_RANK argument with the FREETEXTTABLE and CONTAINSTABLE predicates. In addition, you use TOP_N_BY_RANK to specify that the &quot;Top N By Rank&quot; rows that match the search criteria should return. For more information about the TOP_N_BY_RANK argument, see Microsoft SQL Server 2000 Books Online.

In SQL Server 7.0, the TOP_N_BY_RANK argument is only available on Service Packs that have been applied after SQL Server 7.0 Service Pack 1. For more information, please see the following article in the Microsoft Knowledge Base:

240833 FIX: Full-Text Search Support for TOP via CONTAINSTABLE and FREETEXTTABLE Clauses

Keywords: kbbug kbfix KB308763

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.