Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

jumiprado
New Contributor III

Separate String

Hey guys!

I need your help, again!...

I have an excel file with one column with strings like this:

0A001101068646800000200000001665744520160601000000000000000000000016657445000000000000000000684

1A001101068646800000000000000000000000000000075657VARA, NICOLAS MARIANO3279

2A001101068646900000000000000000000000000000080804FRECHA, MARIA EMILIA3280

3A001101068647000000000000000000000000000000053208PLUGOBOY, MARIA DEL CARMEN3281

424A001101068689100000000000000000000000000000115142ABBATE, GONZALO EMANUEL7243

427A001101068689400000000000000000000000000000004296MARIN, FACUNDO LUCIANO7256

587A001101068705400000000000000000000000000000077563GUGLIOTA, NATALIA MARCELA8846

I need to separate this info in two columns like this

Header 1Header 2
VARA, NICOLAS MARIANO75657
FRECHA, MARIA EMILIA80804
PLUGOBOY, MARIA DEL CARMEN53208
ABBATE, GONZALO EMANUEL115142
MARIN, FACUNDO LUCIANO4296
GUGLIOTA, NATALIA MARCELA77563

Thanks for your help!

1 Solution

Accepted Solutions
Frank_Hartmann
Honored Contributor

Re: Separate String

And use this in script for Header2:

num(evaluate(right(purgechar(right(subfield(Data,',',1),15),'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),6)),'#0') as Header2

hope this helps

7 Replies

Re: Separate String

[...]

jumiprado
New Contributor III

Re: Separate String

@peter cammaert

Thanks for your help, I need to take the numbers that are before the name  and not those who are after, how can I replace that ?

Thanks you again for your help!

Frank_Hartmann
Honored Contributor

Re: Separate String

Have a look at attached file

hope this helps

jumiprado
New Contributor III

Re: Separate String

FRANK, thanks for your help! but in that cases where you put

purgechar(purgechar(right(subfield(Data,',',1),15),'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),'0') as HEADER_2

the cases where you have a value like "4300" the scripts returns "43" and i need "4300", how can i change the script!?

Thanks!@Frank Hartmann

Frank_Hartmann
Honored Contributor

Re: Separate String

i updated the qvw!

Frank_Hartmann
Honored Contributor

Re: Separate String

And use this in script for Header2:

num(evaluate(right(purgechar(right(subfield(Data,',',1),15),'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),6)),'#0') as Header2

hope this helps

jumiprado
New Contributor III

Re: Separate String

THANKS YOU!

Community Browser