Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
example source input data:
sales person, regions
Dave, "North, West"
desired load is 2 rows:
sales person, region
Dave, North
Dave, West
This is the opposite function of concat(region,',')
purpose is to simplify data entry spreadsheet so users do not have to create multiple rows
@daveatkins subfield is the function for you
load person,
subfield(regions,',') as region
FROM Source;
there is no unconcatenate function, the closest is subfield. as there is no indication how many components will be needed, i suggest use combination of subfield and the cosstab feature:
data:
load person, subfield(regions,',',1) as region1, subfield(regions,',',2) as region2;
load 'Dave' as person, 'North,West' as regions
AutoGenerate(1);
newData:
//load person, Region;
crosstable(regionType, region)
load * resident data;
drop table data;
data:
load person, region resident newData;
drop table newData;
the first part is just to start the data table but you will not need that and just point to your table.
@daveatkins subfield is the function for you
load person,
subfield(regions,',') as region
FROM Source;