cancel
Showing results for 
Search instead for 
Did you mean: 

Need to split string

Former Member
0 Kudos

Can anyone please help me...

i have string like "SPARE|52397294-2|3|MEM-C6K-CPTFL1GB=|10|20121220"

From this i need to split this by "|"

Please find the below table for reference.

Header 1Header 2Header 3Header 4Header 5
SPARE52397294-23MEM-C6K-CPTFL1GB=10

Accepted Solutions (1)

Accepted Solutions (1)

former_member189638
Active Contributor
0 Kudos

You have to create 12 variables for that ...But you can achieve this.

First create variable Var1 which stores this value of the string. Then create all other variables as shown below. Header1 to Header 5 are the variables that you need to use in your report

Var1 =[String]

Header1 =Substr([Var1];1;Pos([Var1];"|")-1)

Var2 ==Substr([Var1];Length([Header 1])+2;Length([Var1]))

Header2 =Substr([Var2];1;Pos([Var2];"|")-1)

Var3 =Substr([Var2];Length([Header 2])+2;Length([Var2]))

Header3 =Substr([Var3];1;Pos([Var3];"|")-1)

var4 =Substr([Var3];Length([Header 3])+2;Length([Var3]))

Header4 =Substr([Var4];1;Pos([Var4];"|")-1)

Var5 =Substr([Var4];Length([Header 4])+2;Length([Var4]))

Header5 =Substr([Var5];1;Pos([Var5];"|")-1)

Var6 =Substr([Var5];Length([Header 5])+2;Length([Var5]))

Header6 =Substr([Var6];1;Pos([Var6];"|")-1)

Former Member
0 Kudos

Hi Rakesh,

Thank you very much:)

It works fine. Super

Thanks:)

Answers (0)