8 Replies Latest reply: Dec 21, 2015 2:33 PM by Mark Graham RSS

    Pick the top one in the table among two values

    Mark Graham

      Hi all,

       

      I was trying to fetch the Dept.s of the names.

       

      Every name will have one Dept. and more than one ID.

       

      For eg: in the attached app. we have Name "B" with Dept. J+ JP.

      Since we have two different IDs 2 and 4 for the same name, we can see redundancy of the same record.


      ID,Name,Dept.
      1,A,HD
      2,B,J + JP
      3,C,JB
      4,B,J + JP
      5,D,DD
      6,E,HDLA
      7,E,HDLA
      8,F,GW
      9,G,DHJJLW

       

       

      Required O/P:

      I would like to fetch the values in an unique manner, where i bring in only first values and ignore if the record is available again after the first record. (I tried "Peek" but no luck ) - "Peek('Dept.', 0, 'Table1') as DeptFinal"

       

      I was trying to get some thing like:

      ID,Name,Dept.
      1,A,HD
      2,B,J + JP
      3,C,JB
      5,D,DD
      6,E,HDLA
      8,F,GW
      9,G,DHJJLW

       

      It would be great help, if someone help!