1 Reply Latest reply: Jan 20, 2017 4:33 AM by Anil Babu RSS

    Implementing OR in where part in Join in QlikView

    Shreyan Dutt

      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

        • Re: Implementing OR in where part in Join in QlikView
          Anil Babu

          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