Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ziabobaz
Creator III
Creator III

JOIN tables when field values are zero

Hi,

Situation: I want to Join OrderId table with Main_Table by [Number] field.

I want to record Channel/Source/Campaing values from OrderId to the Main_Table (currently there are no values there), where Map = Table2

Screenshot_4.jpg

The script:

Left Join (Main_table)


Load

'Table2' as map,

number,

channel,

source,

campaign


RESIDENT OrderIdSourceTMP;

Drop Table OrderIdSourceTMP;

The problem is that the tables are not joined because Channel/Source/Campaign in MainTable are considered to exist, although they equal to zero.

Is there a magic sauce?

Thank you!

2 Replies
JustinDallas
Specialist III
Specialist III

It looks like what you need is called an Outer Join, those exist in SQL too.

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/ScriptPrefixes/Outer.htm

Digvijay_Singh

I think if you just use 'Join' in instead of 'left join', it would create new row in the final table, not sure if you want 'social, facebook,123' to reflect in the same row where 'xxx', 'yyy' exists or another row would do.