C
Commish
I have a column of data that varies from 3 to 10 characters. I need to
add the variable number of leading zeros to be able to join it to a
column in a different table - where that column if data has the
leading zeros and is always 10 characters in length. Also, note that
the column of 3-10 characters is a mix of letters and numbers.
It'll be easy enough to do the following: IF(len([Field1])
=3,"0000000"&[Field1])... and then continue on populating the if/then
with 6 zeros, than 5 zeroes, and so on.
But, since I have some time, i was wondering if anyone else has done
this and has a procedure/methodology that is reusable in this scenario.
add the variable number of leading zeros to be able to join it to a
column in a different table - where that column if data has the
leading zeros and is always 10 characters in length. Also, note that
the column of 3-10 characters is a mix of letters and numbers.
It'll be easy enough to do the following: IF(len([Field1])
=3,"0000000"&[Field1])... and then continue on populating the if/then
with 6 zeros, than 5 zeroes, and so on.
But, since I have some time, i was wondering if anyone else has done
this and has a procedure/methodology that is reusable in this scenario.