|
Try
This:
CREATE TABLE T1 (COD_1 FIXED(4), VAL_1 FIXED(4)) CREATE TABLE T2 (COD_2 FIXED(4), VAL_2 FIXED(4)) CREATE TABLE T3 (COD_3 FIXED(4), VAL_3 FIXED(4)) INSERT INTO T1 VALUES (1,1) INSERT INTO T1 VALUES (2,2) INSERT INTO T1 VALUES (3,3) INSERT INTO T2 VALUES (1,1) INSERT INTO T2 VALUES (2,2) nothing for T3. then: select * from t1 left join t2 on (val_1 = cod_2) left join t3 on ( val_2 = cod_3) 3 rows (it's ok) select * from t1 left join t2 on (val_1 = cod_2) left join t3 on (cod_3 = val_2) 0 rows !! (It is wrong) Watch the last 'ON' condition. Well, that is my problem now, can somebody suggest something to fix this? or I must be carefully with the order of operands? Thanks in advance. Ricardo |
- RE: non commutative condition in LEFT JOIN 'ON' cla... Becker, Holger
- Abaco Inform�tica S.A.
