FIX: SQL SELECT Returns Different Results Using the Same DataLast reviewed: October 29, 1997Article ID: Q140300 |
3.00
WINDOWS
kbprg kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSThe number of records returned from the same SQL SELECT statement on the same data is different.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0b for Windows.
MORE INFORMATION
Steps to Reproduce ProblemThe following program displays the number of records returned from two consecutive SQL statements. Note that different numbers are returned.
SET SAFETY OFF CLOSE ALL CREATE TABLE main (num N(1), link C(50), crit C(50)) INSERT INTO main VALUES (1, "YES", "YES") INSERT INTO main VALUES (2, "NO", "YES") INSERT INTO main VALUES (3, "NO", "NO") INSERT INTO main VALUES (4, "YES", "NO") CREATE TABLE link (link C(50)) INSERT INTO link VALUES ("YES") CLOSE ALL CLEAR FOR i = 1 TO 2 lcTmpFile = "tmp" + ALLTRIM(STR(i)) + ".dbf" IF FILE(lcTmpFile) ERASE (lcTmpFile) ENDIF SELECT num, link, crit FROM main ; WHERE ((main.link IN (SELECT link.link FROM link)) OR ; (crit = "YES")) INTO TABLE (lcTmpFile) ? _TALLY ENDFOR |
Additional reference words: 3.00 VFoxWin buglist3.00 fixlist3.00b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |