cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Outer Join in Query Builder

pwilliams-3
11-Garnet

Outer Join in Query Builder

Does anyone know how to use the Outer Join dropdown? Mine is always empty.

Outer Join Against

When the given types or report templates are joined an outer join should be used. Specifically, rows/instances from the type selected in this field should be included even when the join conditions between the two types are not satisfied. Essentially an entry in this column means "allow null entries for this row's type when joining against the type specified in this column." This is a drop-down menu.




Patrick Williams | Engineering Systems | o: 616.698.3766 | c: 616.947.2110
[cid:image001.jpg@01CD2168.9974B390]

1 REPLY 1

This is SQL language. I'm far from an expert and do more trial and error joining in QB then I would like to admit but from what I do know is that the Outter Join is a bit more flexible than the inner join as it has less requirements on it. I copied some Wiki info below:

Reference
outer join
The result of a left outer join (or simply left join) for table A and B always contains all records of the "left" table (A), even if the join-condition does not find any matching record in the "right" table (B). This means that if the ON clause matches 0 (zero) records in B, the join will still return a row in the result-but with NULL in each column from B. This means that a left outer join returns all the values from the left table, plus matched values from the right table (or NULL in case of no matching join predicate). If the right table returns one row and the left table returns more than one matching row for it, the values in the right table will be repeated for each distinct row on the left table. From Oracle 9i onwards the LEFT OUTER JOIN statement can be used as well as (+).[5]<">http://en.wikipedia.org/wiki/Join_(SQL)#cite_note-4>
For example, this allows us to find an employee's department, but still shows the employee(s) even when they have not been assigned to a department (contrary to the inner-join example above, where unassigned employees are excluded from the result).
Example of a left outer join, with the additional result row italicized:
SELECT *
FROM employee
LEFT OUTER JOIN department ON employee.DepartmentID = department.DepartmentID;
Employee.LastName

Employee.DepartmentID

Department.DepartmentName

Department.DepartmentID

Jones

33

Engineering

33

Rafferty

31

Sales

31

Robinson

34

Clerical

34

Smith

34

Clerical

34

John

NULL

NULL

NULL

Steinberg

33

Engineering

33

Oracle supports the alternate syntax:
SELECT * FROM employee, department WHERE employee.DepartmentID = department.DepartmentID(+)
Sybase supports the alternate syntax:
SELECT * FROM employee, department WHERE employee.DepartmentID *= department.DepartmentID


[cid:image002.gif@01CD2152.9E688FE0]

Steve Vinyard
Application Engineer
Top Tags