1 Reply Latest reply: Oct 20, 2011 7:39 AM by Miguel Angel Baeyens de Arce RSS

    Syntax Help....

    Sunil Kenth

      Hi All,

       

      Need some help with some syntax please:

       

       

      if

      (MixMatch([Contractor / Permanent], 'Contractor', 'contractor','Contractor '), 'Contractors' or

      if(MixMatch([Contractor / Permanent],'SI', 'SI ','SI Partner'),'SIPartner'), or
      if(MixMatch([Contractor / Permanent],'?', 'FTC'), 'Other', [Contractor / Permanent])) as [Contractor / Permanent_New],

       

      I would like to group my data together in certain buckets:

       

      'Contractor', 'contractor','Contractor ' =  'Contractors'

      'SI', 'SI ','SI Partner' = 'SIPartner'

      '?', 'FTC' =  'Other'

       

      Then call the the rest keep it the same and for the new buckets created create a new field called [Contractor / Permanent_New].

       

      Thanks,

       

      Sunil

        • Re: Syntax Help....
          Miguel Angel Baeyens de Arce

          Hi Sunil,

           

          I'd use instead a mapping load and a MapSubString() in the field

           

          OldNewValueMap:
          MAPPING LOAD * INLINE [
          Contractor, Contractors 
          contractor, Contractors
          Contractor , Contractors
          SI, SIPartner
          SI , SIPartner
          SI Partner, SIPartner
          ?, Other
          FTC, Other
          ];
          
          Change:
          LOAD *,
               MapSubString('OldNewValueMap', [Contractor / Permanent]) AS [Contractor / Permanent_New]
          INLINE [
          Contractor / Permanent
          Contractor
          Different Value
          contractor
          SI Partner
          ?
          FTC
          ftc
          ];
          

           

          Hope that helps.

           

          Miguel Angel Baeyens

          BI Consultant

          Comex Grupo Ibérica