I have a similar problem. There is one column which contains comma separated values like A1,B2,C1 and I need to split this column into many columns and put the corresponding value there by its type (there is a separate value-type table like A1 is of type T1, B2 is of type T5..)
The resulting table should of the following structure:
A1 is in T1 column, B2 is in T5 column.
How can I add columns whose names are types, something like the result of the SQL statement "select Type from Types" shoud be additional column names to be added to the data table.
Number of records in the Types table is unknown, the number of comma separated values in the field is unknown.