I've fixed this up for you and offered an alternative using ApplyMap() - just comment out the top part of the script and uncomment the second part.
Hope this helps,
TestMapping.qvw 243.5 K
Sorry Stefan and Jason
i know that my problem is complicated so above i attached a simplified example but not the real case so you can't understand what i want to do
Actually the last expression Stefan has posted is working in the case that (A) For example is reflected to (1)
but what if the mapping for Name (A) is related with 2 activities (1 and 2 for example)
and i want the above expression to work with them??
will create a list of the comma separated ActivityNew values, each in quotes (chr(39) is calling the function to return ' with given ASCII code 39 for ' ). The list will then be taken as element_set by the set analysis expression, assigning the values to the field Activity.
I noted also that adding a DISTINCT before ActivitiyNew might be a bit more elegant.
Hope this solves your issue.
P.S: In cases like that, it might be good to spend a few words on your "big picture", this may allow to disregard some solutions upfront and may save some time
if you want to keep the tables not linked, you could just remove the second load from the script and change your expression in the table to
LOAD * Inline
//LOAD Activity as ActivityNew
LOAD * Inline
P.S. Or use a mapping load with your second table and applymap in your first (you need to change the order of your tables though)
P.P.S: I would prefer Jasons second solution (essentially what I meant with my first P.S., just saw his after comitting my post)
edited by swuehl