Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferText Exports Wrong Number

Status
Not open for further replies.

dropspun

Programmer
May 2, 2001
12
0
0
US
I'm doing an export using transfertext. I'm exporting a table with only one record. The last field in the record contains only zero (and is a number, double, with two fixed decimal places). Suddenly, after months of working correctly (by exporting 0) this zero is being exported as 3.63797880709171e-12. It's exporting the table's other numeric fields correctly.

Anyone know what's going on?

 
Sounds like the field has been updated with a really small value.

The safest bet is to write an update query to explitly set it to 0.

If it still does it, transfertext must be doing something weird with floating point or it is a hardware issue (try it on a different machine). A possible workaround assuming all the fields are numbers would be to use the format function to format the numer. Since format returns a string you don't have to worry about the change although you will need an export specification to specify not to export text delimiters.
 

Would you change the field to be of currency data type with scale of 2?
 
lameid,

This problem exists no matter which computer is used. I've tried changing the field to text, but that just makes it display 3.63797880709171e-12 instead of zero.

-- dropspun
 
JerryKlmns,

Thanks! I tried your suggestion and it worked!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top