Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to split a single string into individual letters ? Is there any function ?

Hi All ,

How to split a single string into individual letters ?

Example : A field called PASSWORD has values

PASSWORD

@aklipo

3!5576

i want to split them like

@                                                     and                      @     k    l   i    p   o

a

k

l

i

p

o

and store in table , so that table is read by reading software .

Thanks & Regards

Shekar

1 Solution

Accepted Solutions
t_chetirbok
Specialist
Specialist

for columns

PASS:

load * Inline

[

PASSWORD

@aklipo

3!5576

yhF&kd#1

]

;

max:

load max(len(PASSWORD)) as Max_Size Resident PASS;

let Num =  peek('Max_Size') ;

drop Table max;

sub filling(Number)

left join(PASS)

load PASSWORD , if(len(PASSWORD)>=$(Number),mid(PASSWORD,$(Number),1),null()) as Letter$(Number) Resident PASS;

ENDSUB

for i=1 to $(Num)

call filling($(i));

next

View solution in original post

18 Replies
t_chetirbok
Specialist
Specialist

hi Shekar,

Do you want to have both options: each letter in a new column and each letter in a new row?

or it's enough to have each letter in a new row

shekhar_analyti
Specialist
Specialist
Author

Actually i am testing an application which read letters and pronounces it out .
So basically a this point of time i am not sure which will be better , hence i opted for both the options .

However anything is fine , in case if both ways are not realistic requirement .

Thanks

Shekar

t_chetirbok
Specialist
Specialist

try this:

load PASSWORD, if(iterno()=1,1,0) as FirstLetterFlag,

mid(PASSWORD,IterNo(),1 ) as letter

while IterNo()<=len(PASSWORD);

load * Inline

[

PASSWORD

@aklipo

3!5576

]

;

tresesco
MVP
MVP

Try this:

Load

       PASSWORD,

       mid(PASSWORD,IterNo(),1) as Characters

While iterno()<=Len(PASSWORD);


Load * Inline [

PASSWORD

@aklipo

3!5576]

Capture.JPG

tresesco
MVP
MVP

Too fast!

Anil_Babu_Samineni

Perhaps this?

Load

      PASSWORD,

      mid(PASSWORD,IterNo(),1) as Characters

While iterno()<=Len(PASSWORD);

Load * Inline [

PASSWORD

@aklipo

3!5576

];

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
t_chetirbok
Specialist
Specialist

shekhar_analyti
Specialist
Specialist
Author

So there is no function that Qlik provides ...

To achieve above without using explicit  loops in a way .....

It will be a great help if i get it in columan wise

Anil_Babu_Samineni

No, In UI what you are looking and which object. Is there anything issue from script?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)