6 Replies Latest reply: Mar 4, 2016 6:03 PM by Rob Wunderlich RSS

    Create a flag in script with group by

    Mark Graham

      Hi All,

       

      I'm working on a requirement where i need to create a flag grouping by Order with respect to the value in it.

       

       

      LOAD [Order No],

       

      if(match(MaxString(Inst), 'PT') OR  Index(Indicator,'PP'), 'Y', 'N') as Flag

       

      Resident Table1

      Group By [Order No];

       

       

       

      The problem is, 'PP' is not the MaxString(Value) for the filed and hence it is not fetching me the req. value.

       

      I'm using only Max(String) as i have to always group by Order No.

      Can someone pls help here.

      Any function similar to MaxString() works.