Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loop until len(trim()) = x

Hello all,

I have a number in following format: 99265, 13, 123468

I want to load it as a 10 digit string with zero in front. --> 0000099265, 0000000013, 0000123468


My first try would be something like this:


if(len(trim(x))=1; '00000000' & x ;if(len(trim(x))=2; '0000000' & x ;.....


Is there a way to do this smoother than this?

Thanks

Timo

1 Solution

Accepted Solutions
jaumecf23
Creator III
Creator III

try this : num(x,'0000000000')

View solution in original post

2 Replies
jaumecf23
Creator III
Creator III

try this : num(x,'0000000000')

Anonymous
Not applicable
Author

Thanks for the help! Works perfectly!