HOW TO REMOVE DECIMAL PLACES FROM ACCESS EXPORT?

G

Guest

we have a numeric field in our database set up as Field Size "Double",
decimal places "0". When we export this information to a tab delimited text
file, the export program seems to be adding a decimal and two trailing zeros.
How do we eliminate the additional of the decimal and zeros?
 
T

tina

if your data is whole numbers only, suggest you change the field's FieldSize
from Double to Long Integer. if you're working with decimals, but exporting
whole numbers, try exporting a query. in the query design view, instead of
adding the Double field to the query grid, create a calculated field, as

FixedNumber: Format(DoubleFieldName, "0")

hth
 
G

Guest

Tina:

thanks - this might help. I'm actually importing from a text file,
manipulating the data, and then exporting. The incoming number is an eleven
character field, with leading zeros and a number (Sample: 00000014345). When
importing from a text file (too many records to manipulate the data in
Excel), is there anyway to get the "Get External Data" function in Access to
recognize that the decimal should go before the last two digits? Sample
number is a price, 143.45. If I could figure that out, I wouldn't have to
worry about the export. Thanks!
 
T

tina

suggest you run the import, then run an update query to correct the values
in the Double field, as

UPDATE TableName SET TableName.FieldName = [TableName].[FieldName]/100;

hth
 

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