FIX: SQL SELECT Not Working on Ascending/Descending IndexesLast reviewed: September 22, 1997Article ID: Q104330 |
2.50 | 2.50WINDOWS | MS-DOS kbprg kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSThe SELECT SQL command is used to query one or more databases for information based on certain criteria. This command is Rushmore optimizable, so it will take advantage of any indexes that are already created for the database(s) involved in the query. However, in both FoxPro 2.5 for Windows and FoxPro 2.5 for MS-DOS, an incorrect number of records may be returned when SQL SELECT is used to join the tables. This problem occurs when you are joining two databases and one has the order set to a ascending index and the other has the order set to a descending index. This problem also occurs when you are using RQBE.
STATUSMicrosoft has confirmed this to be a problem in FoxPro version 2.5 for Windows and FoxPro version 2.5 for MS-DOS. This problem was corrected in FoxPro version 2.5a for Windows and FoxPro version 2.5a for MS-DOS.
MORE INFORMATIONThe code below demonstrates this problem. It is using the CUSTOMER and INVOICES databases from the TUTORIAL subdirectory.
SET DEFAULT to \FOXPRO25\TUTORIAL (or \FOXPROW\TUTORIAL) USE customer INDEX ON cno TAG cno ASCENDING SET ORDER TO TAG cno SELECT B USE invoices INDEX ON cno TAG cno DESCENDING SET ORDER TO TAG cno SELECT *; FROM Customer,Invoices; WHERE Customer.cno = Invoices.cno ; AND Customer.cno = "A2695"The correct result should be a Browse window containing five records. However, the result that is actually returned contains only four records.
|
Additional reference words: FoxDos FoxWin buglist2.50 fixlist2.50a 2.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |