6 Replies Latest reply: Nov 19, 2014 8:35 AM by PAUL YEO RSS

    SQL ApplyMap for Rejected Code display missing value

    PAUL YEO

      Hi All

       

      I have a SQL script below working fine :-

       

      Pick(Match(kode_reject, 5, 39), 'reject human error', 'reject machine error') AS DESC_REJECT;

       

      Due to too many error code , i decide to change to mapping ( believe this line cause problem ) :-

       

      ApplyMap('SegmentMap', subfield(kode_reject,' ',1), 'Other') AS DESC_REJECT;

       

      I have the Reject code Table which i can only place after SQL load the raw data into QV ( This also another issue i don't know how to solve ), if i place before loading SQL data to QV , i will get error.

       

      SegmentMap:

      MAPPING LOAD * INLINE [

      Original, New

      5,Human error

      39,Machine error

      A2,Business Partner

      ];

       

      when i reload script , it does not show any error code , but the DESC_REJECT field all value display null or missing value "-"

       

      any advise where go wrong on below line :-

       

      ApplyMap('SegmentMap', subfield(kode_reject,' ',1), 'Other') AS DESC_REJECT;