Subject | Is this a BUG in where clause? FB 1.5 |
---|---|
Author | chiaraprc |
Post date | 2004-04-15T16:06:21Z |
Hi I think this is a bug....
CREATE TABLE TableA (
Field1 VARCHAR(10)
);
CREATE TABLE TableB (
Field2 VARCHAR(10)
);
INSERT INTO TableA (Field1 ) VALUES ('A');
INSERT INTO TableA (Field1 ) VALUES ('B');
INSERT INTO TableA (Field1 ) VALUES ('C');
INSERT INTO TableB (Field2 ) VALUES ('B');
INSERT INTO TableB (Field2 ) VALUES ('C');
INSERT INTO TableB (Field2 ) VALUES ('D');
This work as expected
****************************************
Select TA.Field1, TB.Field2
From TableA TA
Full Join TableB TB On TA.Field1=TB.Field2
order by 1,2
Field1 Field2
========== ==========
A <null>
B B
C C
<null> D
This *DONT* work as expected
****************************************
Select TA.Field1, TB.Field2
From TableA TA
Full Join TableB TB On TA.Field1=TB.Field2
Where TB.Field2 Is Null
Field1 Field2
========== ==========
A <null>
B <null>
C <null>
Server Version WI-V1.5.0.4306 Firebird 1.5
CREATE TABLE TableA (
Field1 VARCHAR(10)
);
CREATE TABLE TableB (
Field2 VARCHAR(10)
);
INSERT INTO TableA (Field1 ) VALUES ('A');
INSERT INTO TableA (Field1 ) VALUES ('B');
INSERT INTO TableA (Field1 ) VALUES ('C');
INSERT INTO TableB (Field2 ) VALUES ('B');
INSERT INTO TableB (Field2 ) VALUES ('C');
INSERT INTO TableB (Field2 ) VALUES ('D');
This work as expected
****************************************
Select TA.Field1, TB.Field2
From TableA TA
Full Join TableB TB On TA.Field1=TB.Field2
order by 1,2
Field1 Field2
========== ==========
A <null>
B B
C C
<null> D
This *DONT* work as expected
****************************************
Select TA.Field1, TB.Field2
From TableA TA
Full Join TableB TB On TA.Field1=TB.Field2
Where TB.Field2 Is Null
Field1 Field2
========== ==========
A <null>
B <null>
C <null>
Server Version WI-V1.5.0.4306 Firebird 1.5