Leading Zeros

  • Thread starter Thread starter steve goodrich
  • Start date Start date
S

steve goodrich

How can I get a table to show leading zeros, eg I enter 0123 and I get 123
I have it formatted as a general number.
If I format as text it will allow leading zeros. is that the correct method?
many thanks
Steve
 
Hi Tom
I looked at the format options as well, but thought I had to select from the
drop down box.
Many Thanks, It worked a treat
Steve
 
Hi,
what's the purpose of the values?
If you do not use them in any calculations you should probably store them as
text e.g. zip codes, phone numbers...all are normally of a text datatype.
HTH
Good luck
 
steve said:
How can I get a table to show leading zeros, eg I enter 0123 and I
get 123 I have it formatted as a general number.
If I format as text it will allow leading zeros. is that the correct
method? many thanks
Steve

Whether you can use formatting or need to switch to a Text DataType is
deterined by answering the following questions...

Do you need values with leading zeros of different lengths?

EX: 01234, 00003456, 01

Do you need values like 00123 and 0123 to be treated by the database as
different values?

If the answer to either of these is Yes, then you need to switch to a Text
DataType. If you answer No to both questions then you can use a Number
field with a format applied OR use a Text DataType.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top