Left Outer Join

LEFT [OUTER] JOIN means that record combinations from both source tables meeting a specified condition should be included in the query result. However, as opposed to inner joining, records from the first source (indicated on the left of the word JOIN) that do not have records meeting the condition from the second source should also be included in the query result.

This way, all records from the first source will be included in the query result; these will be joined with the records from the second source when executing the specified condition. Query result strings without records meeting the condition from the second source will contain NULL in the fields based on the records from this source.

OUTER keyword is optional; it is only used to improve the clarity and readability of the query text.

Example:

// All contractors should be output in the report, while for contractors
// that are also banks a reference to the bank must be given.

SELECT
   Contractors.Ref AS Contractor,
   Banks.Ref AS Bank

FROM
   Catalog.Contractors AS Contractors

LEFT OUTER JOIN
   Catalog.Banks AS Banks

BY
   Contractors.Description = Banks.Description

Query result:

 Contractor  

 Bank

Vendors   

NULL 

"Zarya" knitwear factory

NULL 

Jeans factory   

NULL 

Buyers   

NULL 

Clothing fair

NULL 

"Budenovski" trade house

NULL 

Pavilion 45 in wholesale market

NULL 

Bavaria China  

NULL 

Jeans factory   

NULL 

Promstroibank  

Promstroibank  

 

See also:
                  Inner Join
                  Right Outer Join
                  Full Outer Join

1C:Enterprise Developer's Community