This content has been marked as final. Show 2 replies
You can use a mapping table and the applymap function:
MapRegion: mapping LOAD * INLINE [ ID, REGION, 1, Europe 2, 3, Asia ]; Result: LOAD ID, COUNTRY, applymap('MapRegion',PARENTID,REGION) as REGION, PARENTID INLINE [ ID, COUNTRY, REGION, PARENTID 1, Sweden, Europe, 2, Norway, , 1 3, China, Asia ];
See attached qvw.
Note, the inline loads are just examples. You can create the tables from loads from files or databases just as well.
comm108213.qvw 146.8 K