Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to split a column while doing a data load,
the column name "Category"
| phone Accessories |
| Screen Modules |
| phone Units |
| charger Modules |
| No Product Category |
| charger Units |
| cable Units |
i want to split this column into two, where one column contains only items ending with 'Units'.
Like this?
LOAD
:
if (wildmatch(Category, '*Units'), Category) AS CategoryA,
if (Not wildmatch(Category, '*Units'), Category) AS CategoryB,
:
RESIDENT whatevertable;
Peter
Like this?
LOAD
:
if (wildmatch(Category, '*Units'), Category) AS CategoryA,
if (Not wildmatch(Category, '*Units'), Category) AS CategoryB,
:
RESIDENT whatevertable;
Peter
at load time you can create the two more columns
For example:
if (wildmatch(Category,'*Units') , Category,'NULL') as NEW_FIELD
-Nilesh