Export to txt include .00 after all numbers

B

Bill Board

I am using Access 2007 and I don't understand when I export a table to a txt
file (a pipe delimited file) all the values like zip codes have .00 after
them. For example if the the zip code was 33611 the file would have 33611.00
doens't look like that on the screen.. What gives?
 
C

Clifford Bass

Hi,

I would guess that you designed the field to be a single or double
number. Make a backup first and then change the field type to long integer.
Or, better yet to a twelve-character text field which should accomodate
all(?) the various postal code formats in the world. If you change to text,
you will need to add zeroes to the beginning.

update table
set zip_code = String(5 - Len(zip_code), "0") & zip_code
where Len(zip_code) < 5;

Clifford Bass
 

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

Top