Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Address Validator Transformation
  4. Aggregator Transformation
  5. Association Transformation
  6. Bad Record Exception Transformation
  7. Case Converter Transformation
  8. Classifier Transformation
  9. Cleanse transformation
  10. Comparison Transformation
  11. Custom Transformation
  12. Custom Transformation Functions
  13. Consolidation Transformation
  14. Data Masking Transformation
  15. Data Masking Examples
  16. Decision Transformation
  17. Duplicate Record Exception Transformation
  18. Dynamic Lookup Cache
  19. Expression Transformation
  20. External Procedure Transformation
  21. Filter Transformation
  22. HTTP Transformation
  23. Identity Resolution Transformation
  24. Java Transformation
  25. Java Transformation API Reference
  26. Java Expressions
  27. Java Transformation Example
  28. Joiner Transformation
  29. Key Generator Transformation
  30. Labeler Transformation
  31. Lookup Transformation
  32. Lookup Caches
  33. Match Transformation
  34. Match Transformations in Field Analysis
  35. Match Transformations in Identity Analysis
  36. Merge Transformation
  37. Normalizer Transformation
  38. Parser Transformation
  39. Rank Transformation
  40. Router Transformation
  41. Sequence Generator Transformation
  42. Sorter Transformation
  43. Source Qualifier Transformation
  44. SQL Transformation
  45. Using the SQL Transformation in a Mapping
  46. Stored Procedure Transformation
  47. Standardizer Transformation
  48. Transaction Control Transformation
  49. Union Transformation
  50. Unstructured Data Transformation
  51. Update Strategy Transformation
  52. Weighted Average Transformation
  53. XML Transformations

Transformation Guide

Transformation Guide

Left Outer Join Syntax

Left Outer Join Syntax

You can create a left outer join with a join override. You can enter multiple left outer joins in a single join override. When using left outer joins with other joins, list all left outer joins together, after any normal joins in the statement.
To create a left outer join, use the following syntax:
{
source1
LEFT OUTER JOIN
source2
on
join_condition
}
The following tables displays syntax for left outer joins in a join override:
Syntax
Description
source1
Source table name. With a left outer join, the Integration Service returns all rows in this table.
source2
Source table name. The Integration Service returns rows from this table that match the join condition.
join_condition
Condition for the join. Use syntax supported by the source database. You can combine multiple join conditions with the AND operator.
For example, using the same REG_CUSTOMER and PURCHASES tables described in Normal Join Syntax, you can determine how many customers bought something in June with the following join override:
{ REG_CUSTOMER LEFT OUTER JOIN PURCHASES on REG_CUSTOMER.CUST_ID = PURCHASES.CUST_ID }
The Integration Service returns the following data:
CUST_ID
FIRST_NAME
LAST_NAME
DATE
AMOUNT
00001
Marvin
Chi
6/10/2000
255.56
00002
Dinah
Jones
6/3/2000
55.79
00003
John
Bowden
NULL
NULL
00004
J.
Marks
6/15/2000
534.95
00002
Dinah
Jones
6/10/2000
104.45
00002
Dinah
Jones
6/21/2000
98.65
The Integration Service returns all registered customers in the REG_CUSTOMERS table, using null values for the customer who made no purchases in June. It does not include purchases made by non-registered customers.
Use multiple join conditions to determine how many registered customers spent more than $100.00 in a single purchase in June:
{REG_CUSTOMER LEFT OUTER JOIN PURCHASES on (REG_CUSTOMER.CUST_ID = PURCHASES.CUST_ID AND PURCHASES.AMOUNT > 100.00) }
The Integration Service returns the following data:
CUST_ID
FIRST_NAME
LAST_NAME
DATE
AMOUNT
00001
Marvin
Chi
6/10/2000
255.56
00002
Dinah
Jones
6/10/2000
104.45
00003
John
Bowden
NULL
NULL
00004
J.
Marks
6/15/2000
534.95
You might use multiple left outer joins if you want to incorporate information about returns during the same time period. For example, the RETURNS table contains the following data:
CUST_ID
CUST_ID
RETURN
00002
6/10/2000
55.79
00002
6/21/2000
104.45
To determine how many customers made purchases and returns for the month of June, use two left outer joins:
{ REG_CUSTOMER LEFT OUTER JOIN PURCHASES on REG_CUSTOMER.CUST_ID = PURCHASES.CUST_ID LEFT OUTER JOIN RETURNS on REG_CUSTOMER.CUST_ID = PURCHASES.CUST_ID }
The Integration Service returns the following data:
CUST_ID
FIRST_NAME
LAST_NAME
DATE
AMOUNT
RET_DATE
RETURN
00001
Marvin
Chi
6/10/2000
255.56
NULL
NULL
00002
Dinah
Jones
6/3/2000
55.79
NULL
NULL
00003
John
Bowden
NULL
NULL
NULL
NULL
00004
J.
Marks
6/15/2000
534.95
NULL
NULL
00002
Dinah
Jones
6/10/2000
104.45
NULL
NULL
00002
Dinah
Jones
6/21/2000
98.65
NULL
NULL
00002
Dinah
Jones
NULL
NULL
6/10/2000
55.79
00002
Dinah
Jones
NULL
NULL
6/21/2000
104.45
The Integration Service uses NULLs for missing values.

0 COMMENTS

We’d like to hear from you!