2 Replies Latest reply: May 19, 2011 9:04 AM by jvrnic.fi RSS

    Load Resident if Exists

      I'm newbie with Qlikview.

       

      I can do this with SQL

       

       

      SELECT x, y, 'OK' As STATUS FROM Table1 WHERE

                EXISTS (SELECT * FROM Table2 WHERE x = t2x AND y = t2y AND tppr <>100)

      OR

                EXISTS (SELECT * FROM Table3 WHERE x = t3x AND y = t3y AND ttpr <>100)

       

      How can same be made with Qlikview LOAD RESIDENT clause? What i want to do is add one column in table1 with new status information

        • Load Resident if Exists

          Try This:

          Table:

          Load

          x,

          y,

          tppr

          from table2.qvd (qvd) where  x = 't2x' AND y =' t2y' AND tppr <>100;

           

          concatenate

           

          Load

          x,

          y,

          ttpr

          from table3.qvd (qvd) where  x = 't3x' AND y = 't3y' AND ttpr <>100;

           

          concatenate

           

          Load

          x,

          y

          from table1.qvd (qvd);

           

          TableFinal:

          Load

          x,

          y,

          'OK'  As STATUS

          resident  Table where (x = 't2x' AND y =' t2y' AND tppr <>100) or (x = 't3x' AND y = 't3y' AND ttpr <>100);

           

          drop table Table;