Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

LEFT OUTER JOIN SQL in Qlik

How to handle LEFT OUTER JOIN with the following ON Clause?

 

TABLE_A

....

LEFT OUTER JOIN TABLE_B ON TABLE_B.[Item] = TABLE_A.[Item] and (TABLE_B.[Region Code] = 0 or TABLE_B.[Country Code] = TABLE_A.[Country Code])

To help community find solutions, please don't forget to mark as correct.
Tags (2)
Labels (3)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: LEFT OUTER JOIN SQL in Qlik

noconcatenate
TABLE_B:
LOAD <Columns in table B>,
Table_B.Item as Item,
Table_B.Country_Code as Country_Code
RESIDENT tempTABLE_B
where [Region_Code]=0;

drop table tempTABLE_B;

left join(TABLE_B)
load
<Columns in table A>,
Table_A.Item as Item,
Table_A.Country_Code as Country_Code
resident
TABLE_A

 

The idea here is to switch sql <on> clause to columns with the same name in both table,
ideally the key to join both tables.

View solution in original post

1 Reply
Highlighted
Partner
Partner

Re: LEFT OUTER JOIN SQL in Qlik

noconcatenate
TABLE_B:
LOAD <Columns in table B>,
Table_B.Item as Item,
Table_B.Country_Code as Country_Code
RESIDENT tempTABLE_B
where [Region_Code]=0;

drop table tempTABLE_B;

left join(TABLE_B)
load
<Columns in table A>,
Table_A.Item as Item,
Table_A.Country_Code as Country_Code
resident
TABLE_A

 

The idea here is to switch sql <on> clause to columns with the same name in both table,
ideally the key to join both tables.

View solution in original post