1 Reply Latest reply: Sep 25, 2014 12:59 PM by Angad Singh RSS

    Subquery to compare Data from same qvd

      Hi.

      first of all thanks for the attention :-)

      I have this problem(i try ro semplify the question):

      There is a one QVD with FIELDS

      CLIENT, DEPARTMENT, FACILITY, YEAR(value can be only 2014 and 2013)

      is necessary to create a Flag on CLIENT-DEPARTMENT Level that shoulbe be have this value:

      -"New" if CLIENT in 2014 isn't present in 2013

      -"Expanded" if CLIENT in 2014 is present in 2013 but with Different DEPARTMENT

      -"Ext Fac" if CLIENT + DEPARTMENT in 2014 is present in 2013 but with a FACILITY that not present in 2014

      -"Ent Fac" if CLIENT + DEPARTMENT in 2014 is present in 2013 but with a FACILITY that non PRESENT in 2013

      -"Change Fact" if CLIENT + DEPARTMENT in 2014 is present in 2013 but with a different Facility of 2014

      -"False" no condition above is satisfied

       

      in SQL i can do more subquery but with LOAd i don't have any idea......

      Many thanks