13 Replies Latest reply: Jul 15, 2015 7:36 AM by Kumar Pramod RSS

    Wildmatch code???

      Hi all,

       

      I want to change the content of my field based on three conditions:

      -if contains '_AB' change to AB,

      -if contains '_CD' change to CD,

      -others leave as it is.

       

       

      Where is my error in the following code? Thank you in advance!!!

       

      LOAD

          NAME,

          IF(WILDMATCH(NAME, '*_AB*'),'AB', NAME

          and WildMatch(NAME, '*_CD*'), 'CD', NAME) as NewField

         

       

       

      FROM [lib://SAMPLE/Mappe1.xlsx]

      (ooxml, embedded labels, table is Tabelle1);

       

      best,

      Rustam