Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
pkelly
Specialist
Specialist

Left Join use WHERE?

I have a temporary product table within a script called TempProduct06

This contains a product type field (pro_Type)...

Types = A, B, C, D etc...

Within this table I have a field called pro_Rpt02 which contains analysis codes.

For Product Type D, we need to add grouping.

The following is an extract from my script which is workable...

** Code Starts **

// Create Inline Table

TempRpt02DoorsGrouping:

LOAD * INLINE [

pro_Rpt02,pro_Rpt02Grouping

"","Grp 9 (others)"

DCBA,"Grp 1"

DCBB,"Grp 1"

DMBA,"Grp 1"

DMBC,"Grp 1"

DCEA,"Grp 2"

DCHC,"Grp 3"

DCHD,"Grp 3"

DCHE,"Grp 3"

DCHF,"Grp 3"

DCHN,"Grp 3"];

// Join to Temp Product Table

LEFT JOIN (TempProduct06)

LOAD

pro_Rpt02,

pro_Rpt02Grouping

RESIDENT TempRpt02DoorsGrouping;

// Drop Table

Drop Table TempRpt02DoorsGrouping;

** Code Ends **

Ideally, when doing my left join, I would like to say that this should only be done where the TempProduct06 pro_Type field = "D"

Is this possible?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

// Create Inline Table

TempRpt02DoorsGrouping:
LOAD *
,'D' as pro_Type
INLINE [
...
];

// Join to Temp Product Table

LEFT JOIN (TempProduct06)
LOAD *
RESIDENT TempRpt02DoorsGrouping
;

View solution in original post

1 Reply
johnw
Champion III
Champion III

// Create Inline Table

TempRpt02DoorsGrouping:
LOAD *
,'D' as pro_Type
INLINE [
...
];

// Join to Temp Product Table

LEFT JOIN (TempProduct06)
LOAD *
RESIDENT TempRpt02DoorsGrouping
;