i've got some country code values in a coulmn comma separated, how do i return their corresponding mapped values (e.g. ccy in my sample below)?
| country | ccy |
+------------+---------------+
| HK | HKD |
| JP | JPY |
| JP, KR | JPY, KRW |
| AU, NZ | AUD, NZD |
| US, UK, EU | USD, GBP, EUR |
the individual mapping is stored in a separate table data_mapping:
| country | ccy |
+---------+-----+
| HK | HKD |
| JP | JPY |
| KR | KRW |
| AU | AUD |
| NZ | NZD |
| US | USD |
| UK | GBP |
| EU | EUR |
basically i would need a function f_ccy(country_list) with ccy_list returned, which will split, lookup & merge back into a list
is it feasible?