Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding one char (3) to to each char in a string

Hi All, I need to create the new field based on existing field. I need to add 3 to each number in a field.

for ex:

Field --> NewField

325 --> 333235

A3C  --> 3A333C

4518 --> 34353138

I achieved this script. But the script took longer times to load

T:

LOAD * INLINE [

ID

325

43534

78204

A3C

] ;

LOAD ID , Concat(HID , '' , S) AS HID

Group BY ID;

LOAD ID , 3& Mid(ID , IterNo() ,1) AS HID , IterNo() AS S

Resident T While IterNo() <= Len(ID) ;

But this small piece of code took longer times.

So there any other way to achieve this with lower reload time.

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Well, you could try a mapping table and mapsubstring


talk is cheap, supply exceeds demand