Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have csv data like:
Date,Country,Outlet,Sales
2017 CW 01,Germany,Outlet1,5530
2017 CW 01,Poland,Outlet2,4500
2017 CW 01,Germany,Outlet3,750
2017 CW 01,UK,"Outlet4,Ltd.",1900
2017 CW 01,France,Outlet5,552
2017 CW 01,Germany,Outlet6,7500
2017 CW 01,Spain,Outlet7,5700
Is there any possibility to load the text between the quotation marks (Outlet4,Ltd.) as Outlet?
thank you very much for sharing this 🙂
Hi,
maybe another solution (using the quoting feature twice) could be:
mapFields:
Mapping LOAD '@'&RowNo(), SubField(@1,',')
FROM [Example.csv] (txt, codepage is 1252, no labels, delimiter is '\t', msq)
Where RecNo()=1;
tabTemp:
LOAD * FROM [Example.csv] (txt, codepage is 1252, no labels, delimiter is '\t', msq)
Where RecNo()>1;
tabOut:
LOAD * FROM_FIELD (tabTemp, @1) (txt, utf8, no labels, delimiter is ',', msq);
DROP Table tabTemp;
RENAME Fields using mapFields;
hope this helps
regards
Marco