Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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
Highlighted
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

Highlighted
Specialist
Specialist

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

Highlighted
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

]

;

Highlighted
MVP
MVP

Try this:

Load

       PASSWORD,

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

While iterno()<=Len(PASSWORD);


Load * Inline [

PASSWORD

@aklipo

3!5576]

Capture.JPG

Highlighted
MVP
MVP

Too fast!

Highlighted

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)
Highlighted
Specialist
Specialist

Highlighted
Specialist
Specialist

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

Highlighted

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)