I have a csv file with a specific field like this:
AT IT BA
AT BA LB
I want to create something like:
TYPE OPTION1 OPTION2 OPTION3
AT IT IT BA
AT BA LB
How i can do it?
I think when you load CSV you are able to specify the delimiter. Have you tried to specify <space> as your delimiter?
LOAD @1 as TYPE, @2 as OPTION1, @3 as OPTION2, @4 as OPTION3
(txt, codepage is 1252, no labels, delimiter is spaces, msq, header is 1 lines);
Thanks! Some way to do without using the load statement?
If not, my file has a lot of columns, how i can adjust the load script to only split the desired column?
with subfield function
subfield(TYPE, ' ', 1) as TYPE,
subfield(TYPE, ' ', 2) as OPTION1,
subfield(TYPE, ' ', 3) as OPTION2,
subfield(TYPE, ' ', 4) as OPTION3
(txt, codepage is 1252, embedded labels, delimiter is ';', msq);
subfield also works in chart
Retrieving data ...