Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
vkish16161
Creator III
Creator III

How to insert a comma after every character? Any built in function?

All,

Here's my requirement:

Say I have ABCvnfj12$$ . I want this to become A,B,C,v,n,f,j,1,2,$,$ ?

How can I make it happen using back-end script?

stalwar1

1 Solution

Accepted Solutions
sunny_talwar

May be this

Table:

LOAD Field,

Concat(NewField, ',', RecNo()) as NewField

Group By Field;

LOAD Field,

Mid(Field, IterNo(), 1) as NewField

While IterNo() <= Len(Field);

LOAD * Inline [

Field

ABCvnfj12$$

];

View solution in original post

2 Replies
sunny_talwar

May be this

Table:

LOAD Field,

Concat(NewField, ',', RecNo()) as NewField

Group By Field;

LOAD Field,

Mid(Field, IterNo(), 1) as NewField

While IterNo() <= Len(Field);

LOAD * Inline [

Field

ABCvnfj12$$

];

vkish16161
Creator III
Creator III
Author

This also works. Just found out the solution:

Test1:

load 1234 as ID, Concat(Dummy) as Dummy;

load * Inline [

Dummy

ASD,

Fv,

gn%,

$#&];


let vLen      = Len(Peek('Dummy',0,'Test1'));

let vString   = Chr(39)&Peek('Dummy',0,'Test1')&Chr(39);



For i = 1 to $(vLen)

load Mid($(vString), $(i),1) as Charecter

Autogenerate 1;

next