5 Replies Latest reply: Sep 18, 2014 4:02 PM by Manish Kachhia RSS

    Mapping on multiple fields

    Brian Yordnoff

      Need some scripting help. I'm familiar with applymap(), but I need something that works on multiple fields. For instance, I have a table Main with columns ID, A, B:


      I need something that works to the effect of, if A = 'X' and B = 'Y' then let B = 'Z'.


      I have several such "exclusions," and it would be nice to put them in an inline mapping table with columns A, B_old and B_new. In this case, the inline mapping table would have a row ('X', 'Y', 'Z').


      I thought of using a left join on the inline mapping table from the Main table to create my column B, but then only mapped values will populate the new column B.


      Any ideas? Thanks.