15 Replies Latest reply: Jan 11, 2016 12:16 PM by Sunny Talwar RSS

    Nested If statement with Match

    lakwinder singh

      Hi Guys,

       

      Why doesn't the following If statement show me the last three fields that i created? 'JJJJ', 'KKKK' and 'LLLL' (The Match syntax ones), i can see from AAAA to IIII.

       

      Thanks

       

      [PRODUCT]:

      Mapping LOAD

      SID_PRODUCT,

      if(PRODUCT_FAMILY_DESC='1','AAAA',

                  if(PRODUCT_FAMILY_DESC='2','BBBB',

                  if(PRODUCT_FAMILY_DESC='3','CCCC',

                  if(PRODUCT_FAMILY_DESC='4','DDDD',

                              if(PRODUCT_FAMILY_DESC='5','EEEE',

      if(PRODUCT_FAMILY_DESC='6','FFFF',

      if(PRODUCT_FAMILY_DESC='7','GGGG',

                                          if(PRODUCT_FAMILY_DESC='8','HHHH',

                                          if (PRODUCT_FAMILY_DESC='9','IIII',

      if(MATCH(PRODUCT_FAMILY_DESC,'3','4'),'JJJJ',

      If(match(PRODUCT_FAMILY_DESC,’4','5'),'KKKK',

      IF(MATCH(PRODUCT_FAMILY_DESC,'6','7'),'LLLL')))))))))))) as PRODUCT_FAMILY_DESC

          

       

      FROM [lib://QVD_FOLDER (XXXXXXX)/PRODUCT.qvd]

      (qvd);