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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Expression / Scientific Notation Results

Status
Not open for further replies.

jdegeorge

Programmer
Mar 19, 2002
1,313
US
Hi

I have 2 tables, each with 2 fields: A/C# and QTY.

I have a select query that looks for A/C# and QTY that match. The QTY field is Number, Fixed, 5 decimal places.

This query also has an expression that looks for the difference between QTY-A and QTY-B. Although there really aren't any differences between the two QTY fields in each table, there are a small number of records where the expression formula results in whacky scientific notation, such as 7.105427357601E-15. How can that be?

The data sources for each table are TXT files. One file's QTY value is already in the format of 123.45678 (5 fixed decimal places). The other file's QTY value is 12345678, so to get the decimal in the correct place run an interim query to reformat the value by multiplying it by .0001.

The resulting numbers look exactly the same between tables, but some records in the query's DIFF expression shows the scientific notation amount.

Any ideas as to why this could be happening?

Thanks in advance!



Jim DeGeorge [wavey]
 
The real numbers (ie single or double) aren't exact values.
You may consider using the CCur or CDec function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
So instead of multiplying only by 0.0001, I should try Ccur(QTY * 0.0001)?

Jim DeGeorge [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top