Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to pull data from a table that has one column that hold data from 'list' type. Other columns are from 'string' type.
List is represented a string delimited by a comma.
Is there a simple solution to pull all values in list to the same field, and duplicate the whole line for each value?
I will provide an example:
Input:
| UserCode | Name | |
|---|---|---|
| YANIVB,YANIVBM,YANIV123 | Yaniv Ben-Malka | yaniv@123.com |
| OMER | Omer Shaked | omer@123.com |
Requested Output:
| UserCode | Name | ||
|---|---|---|---|
| YANIVB | Yaniv Ben-Malka | yaniv@123.com | |
| YANIVBM |
| yaniv@123.com | |
| YANIV123 |
| yaniv@123.com | |
| OMER | Omer Shaked | omer@123.com |
Try this,
load *,
SubField(UserCode,',') as UserCode1
from tablename;
Try with subfield function.
Load
SubField(UserCode,',') as UserCode,
Name,
From Source;
Great, It works!
Didn't realize it is so simple ![]()