Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have a list box as shown below:
Hotel Owner |
---|
Peter, Goerge |
Bradley, cooper |
Jim, Watson |
I need a output like this as shown below:
Primary | Secondary |
---|---|
Peter | George |
Bradeley | Cooper |
Jim | Watson |
The first name listed in each cell is the prmary and the second is the secondary. please suggest.
The inline load was just to load some example data, it isn't the solution.
Like This
Load SubField(HotelOwner,',',1) as Primary, SubField(HotelOwner,',',2) as Secondary
Load * Inline [
HotelOwner
Peter, Goerge
Bradley, Cooper
Jim, Watson
];
Then take only Primary and Secondary to Table box
i ahve huge data like that..i can t use inline to add all the data.. so is there any pther way to add.
Like This
Load *,SubField(HotelOwner,',',1) as Primary, SubField(HotelOwner,',',2) as Secondary;
//This is Your Table
Load * FROM <Table>;
OR You can use This
Load *,SubField(HotelOwner,',',1) as Primary, SubField(HotelOwner,',',-1) as Secondary;
//This is Your Table
Load * FROM <Table>;
Try this way
SourceData:
LOAD * Inline
[
"Hotel Owner"
"Peter, Goerge"
"Bradley, cooper"
"Jim, Watson"
];
New:
LOAD
*,
SubField("Hotel Owner",',',1) as Primary,
SubField("Hotel Owner",',',2) as Secondary
Resident SourceData;
DROP Table SourceData;
Regards,
Anand
The inline load was just to load some example data, it isn't the solution.