Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pelamis22
Contributor
Contributor

Join 2 tables

Hello,

I'm trying to join 2 tables into one:

Table 1:

ReferenceRegionRegulator
100USDODDFrank
101EMEAEMIR
102USDODDFrank
103USDODDFrank
104EMEAEMIR
105EMEAEMIR
106EMEAEMIR

 

Table 2:

Static_regionStatic_Regulator
USDODDFrank
EMEAEMIR

 

in the following manner:  Static Region(T2) = Region (T1) and Static Regulator(T2) is equivalent to Static Region(T2):

ReferenceRegionRegulatorStatic_RegionStatic_Regulator
100USDODDFrankUSDODDFrank
101EMEAEMIREMEAEMIR
102USDODDFrankUSDODDFrank
103USDODDFrankUSDODDFrank
104EMEAEMIREMEAEMIR
105EMEAEMIREMEAEMIR
106EMEAEMIREMEAEMIR

 

I tried Join function with distinct feature but the results are not as shown above.

Can you please let me know which is the best way to join those 2 tables?

Regards,

2 Replies
Vegar
MVP
MVP

Try this:

Load
  Reference,
  Region,
  Regulator
From Table1 ;

Left join 
Load
  Reference,
  Static_region,
  Static_Regulator,
  Static_region as Region, // join field
  Static_Regulator as Regulator //join field
From 
  Table2;

 

Brett_Bleess
Former Employee
Former Employee

Andrzej, did Vegar's solution work for you?  If so, please consider using the Accept as Solution button on his post to give him credit and let others know this worked for you.

Here is the Help link for Join as well, just in case you are still working on things, may help you sort something if you are still trying to figure something out here.

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.