FIX: SELECT ... UNION Produces Unexpected OutputLast reviewed: October 14, 1997Article ID: Q109581 |
2.5x 2.60 | 2.5x 2.60 | 2.50b
WINDOWS | MS-DOS | MACINTOSHkbprg kbbuglist kbfixlist The information in this article applies to:
SYMPTOMSThe UNION clause of the SELECT statement can cause unexpected output under certain circumstances.
STATUSMicrosoft has confirmed this to be a problem in the products listed at the beginning of this article. This problem was corrected in FoxPro version 2.6a for MS-DOS and FoxPro version 2.6a for Windows.
MORE INFORMATION
Steps to Reproduce ProblemExecuting the following code will demonstrate this problem:
CREATE TABLE test1 (one c(1), two c(1), three c(1)) INSERT INTO test1 VALUES ('a','b','c') CREATE TABLE test2 (one c(1), two c(1), three c(1)) INSERT INTO test2 VALUES ('a','b','c') * Notice the output produced by this SELECT statement, which includes * the clause "UNION ALL". SELECT one,two,three FROM test1 UNION ALL ; SELECT one,one,three FROM test2 TO SCREEN ONE TWO THREE a b c a a c * Notice the output produced by this SELECT statement, which includes * the clause "UNION". It is different from the output produced by the * previous SELECT statement, which includes the clause "UNION ALL". SELECT one,two,three FROM test1 UNION ; SELECT one,one,three FROM test2 TO SCREEN TWO_A TWO_B THREE a a c b b c |
Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b sql
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |