Icon View Incident Report

Serious Serious
Reported By: José Eduardo Helminsky
Reported On: 4/26/2001
For: Version 2.08 Build 1
# 770 Using Multiple OR Conditions in a LEFT OUTER JOIN Clause Does not Work Properly

The following SQL does not return the correct results:

Table A

Code    Name
1       John
2       Mary
3       Michael
4       Tom

Table B

OtherCode    Description    N1    N2    N3
1            Enginner       1     3
2            Developer      2           3

When I use:
SELECT Code, Name, Count(*) from A
left outer join B on (Code = B.N1) or (Code = B.N2) or (Code = B.N3)
group by cod

It will result in:
Code     Name     Count(*)
1        John     1
2        Mary     1
3        Michael  2  // One from field N2 from Othercode=1 and other 
from N3 from OtherCode=3
4        Tom      0   <- This is what I want. There is no record 
found in table B to relate with A but it does not appear in the results



Resolution Resolution
Fixed Problem on 4/29/2001 in version 2.09 build 1
Image