3 Replies Latest reply: May 26, 2016 6:45 AM by sonthu chatterjee RSS

    Using preceding load for the having Clause

    sonthu chatterjee

      Hi All,

       

      After searching a lot for the having clause in the Qlikview SQL script, Realized that it does not exist in qlikview. Am i right?

      After some more thorough research found that we need to use preceding load for the above process.

      So, I tried the same in the below query.

       

      MEDM:

       

      EFFDAT is in the form yyyy.mm.dd

       

      membnoeffdat
      23456682016.01.05
      23456682016.01.07
      23456682016.01.08
      24567892016.01.06

       

      MEDM is a  resident table created above

       

      medm1:

      load * where effdat = maxeffdat;

      load membno, effdat, max(effdat) as maxeffdat  resident medm  group by membno;

       

      but dilemma is that it does not work , as i want a single EFFDAT(i.e MAXIMUM value) for a single MEMBNO

      result should be as follows

       

      membnoeffdat
      23456682016.01.08
      24567892016.01.06

       

      Please let me know if i am doing something wrong or  some more enhancement is required in the query.

       

      Thanks in advance

      Regards,

      Sonthu