Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nachiket_shinde
Contributor III
Contributor III

Subfield function to get output

Hello Team ,

How can I use Subfiled to get below output:

  

String Column1Column2Column3
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149RJ3438RR65149
Rohit|Jalon|RJ3438RJ3438
Rohit|Jalon|RJ3438; Ramesh|Roy|RR65149; Rakesh|Singh|SS54582RJ3438RR65149SS54582

Thanks in advance

2 Replies
sunny_talwar

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

];

YoussefBelloum
Champion
Champion

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

];