Showing results for 
Search instead for 
Did you mean: 

Adding Leading Zeros to your data

DC Motor
To add leading zeros, follow this tip.

Assume you have a column which contains numbers.  These numbers all need to be 12 characters in length with leading zeros.
Original ValueDesired Value

Use a Compute statement.  Concatenate as many zeros as you need for the whole field length, then concatenate it with the Original Number.  From that, take the rightmost 11 characters.


RIGHT(CONCATENATE("000000000000",@ColumnName@ ),12)


Labels (1)
0 Kudos
0 Replies