0 Replies Latest reply: Jun 17, 2018 9:26 PM by Bill Uran RSS

    Look Up value based on first occurrence of record

    Bill Uran

      Hello, Have a table PersonID, Event, Date. I currently have in the script to label event based on the beginning of value in load script.

      if(left(event,4)='9921','LABELX','') as VISITTYPE

      works great.

      However If PersonID does not have a 9921 label then I want to label the first event that starts with 9920 for each PersonID. If it shows up a 2nd etc.. time don't label for that PersonID.


      The table is already in chronological  order.