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: 
Not applicable

How to set the length of a field?

Hi,

If I have item numbers, that come in in various lengths, say, 3 to 5 characters, but I want to make them all 6 characters long, how do I do that?  I've looked everywhere but can't find any topics pertaining specifically to this, thanks for your help.

1 Solution

Accepted Solutions
marcus_sommer

Try it with num(Field, '000000')

- Marcus

View solution in original post

5 Replies
marcus_sommer

Try it with num(Field, '000000')

- Marcus

alexandros17
Partner - Champion III
Partner - Champion III

If your field name is for example myField then:

=Repeat('0',6-Len(myField )) & myField

let me know

Anonymous
Not applicable
Author

yes Marcus is correct  you will get your numbers followed by 0 (zeros)

ex for 10 you will get 000010

Not applicable
Author

Perfect! Worked! Thank you!

alexandros17
Partner - Champion III
Partner - Champion III

That solution works only with numbers ...