Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shreyandutt
Contributor
Contributor

Implementing OR in where part in Join in QlikView

Hi All,

I want to implement a join in QlikView, similar to the below SQL query:

select tableA.*, tableB.column3

from tableA , tableB

where (tableA.column1=tableB.column1 or tableA.column2=tableB.column2);

Any inputs how this can be done in QV while loading the dashbard? One option is to use similar query as above in the QVD loader in the SQL statement, wanted to check if this can be done after the QVD load.

Regards,

Shreyan

1 Reply
Anil_Babu_Samineni

Shreyan, May be like this

Qualify *;

tableA:

Select column1, column2, column3, column4

FROM tableA;

Unqualify column1, column2, column3, column4;

qualify *;

tableB:

Select column1, column2, column3, column4

FROM tableB;

Unqualify column3;

Final:

Noconcatenate

Load tableA.*; tableB.column3 resident tableA, tableB where (tableA.column1 = tableB.column1) OR (tableA.column2=tableB.column2);


Drop Tables tableA, tableB; // If need to drop then you will do

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful