10 Replies Latest reply: Sep 17, 2014 8:34 AM by Ridhaa Hendricks RSS

    Best way to Group Fields

    Ridhaa Hendricks

      Hi All

       

      I have a table of Customers

      My requirement is to group these customers

       

      Customers

      Cars1

      Cars2

      Cars3

      Cars4

      Cars5

      SoccerBalls1

      SoccerBalls2

      SoccerBalls3

      Paper1

      Paper2

      Paper3

      Paper4

       

      I need to group them into

       

      Cars

      SoccerBalls

      Paper

       

      I can use the if(Customers like '*Cars*', 'Cars') as GroupName

      but this will take forever as my list of clients is huge.

      also within the data i would need to do two like clauses for one group name, how would I do that?

      eg. if(Customers like '*Cars* and Like '*Taxis*','Cars') as GroupName   ---- I have Tried this it doesnt work.

       

      Thank you