Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team ,
How can I use Subfiled to get below output:
String | Column1 | Column2 | Column3 |
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149 | RJ3438 | RR65149 | |
Rohit|Jalon|RJ3438 | RJ3438 | ||
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149; Rakesh|Singh|SS54582 | RJ3438 | RR65149 | SS54582 |
Thanks in advance
May be this
Table:
LOAD *,
Trim(SubField(Trim(SubField(String, ';', 1)), '|', -1)) as Column1,
Trim(SubField(Trim(SubField(String, ';', 2)), '|', -1)) as Column2,
Trim(SubField(Trim(SubField(String, ';', 3)), '|', -1)) as Column3;
LOAD * INLINE [
String
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149
Rohit|Jalon|RJ3438
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149; Rakesh|Singh|SS54582
];
Hi,
here is another way to do it:
Table:
LOAD *,
TextBetween(String,'|',';',2) as Column1,
TextBetween(String,'|',';',4) as Column2,
TextBetween(String,'|','',6) as Column3;
LOAD * INLINE [
String
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149
Rohit|Jalon|RJ3438
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149; Rakesh|Singh|SS54582
];