Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mapuna
Partner - Contributor III
Partner - Contributor III

Adding a character in between a string at equal intervals dynamically

I have  a table containing names in each row.

Table1:

AnupamRaj_0-1671539738598.png

I want to transform this into:

AnupamRaj_1-1671539805587.png

 

Labels (1)
1 Solution

Accepted Solutions
MarcoWedel

Hi,
one solution could be:

MarcoWedel_0-1671567120641.png



mapInsChr:
Mapping LOAD Chr(RecNo()), Chr(RecNo())&'_' AutoGenerate 255;

tabNames:
LOAD *,
     Left(MapSubString('mapInsChr',NAME),Len(NAME)*2-1) as NAME_with_Char
Inline [
NAME
anup
peter
alexander
];

 

 

View solution in original post

2 Replies
MarcoWedel

Hi,
one solution could be:

MarcoWedel_0-1671567120641.png



mapInsChr:
Mapping LOAD Chr(RecNo()), Chr(RecNo())&'_' AutoGenerate 255;

tabNames:
LOAD *,
     Left(MapSubString('mapInsChr',NAME),Len(NAME)*2-1) as NAME_with_Char
Inline [
NAME
anup
peter
alexander
];

 

 

Mapuna
Partner - Contributor III
Partner - Contributor III
Author

Hi, its the best solution i came across so far. I implemented something similar using for loop. But this looks efficient. Thanks for responding!