3 Replies Latest reply: Oct 19, 2016 2:05 AM by Kunal Verma RSS

    Evaluating Sub-string from a field ?

    Kunal Verma

      Hi Folks,

      I need your help.

       

      My Data structure is as follows

      id        airline      
      100     9W
      101     9W|6E

      102     9W|9W
      103     6E
      104     6E|6E|6E

      105     9W|9W

       

      where id is unique and auto-incremental. All airline codes are of 2 characters separated by a "|" character .

      I have to find count of ids of each distinct airline
      Final output should be
      9W: 4 (100,101,102,105)

      6E : 3  (101, 103, 104)
      Every id is counted once even if  it has multiple airlines.

       

      Please guide, what functions/approach should I use.