Querying Numbers - Field Size = "Double"

  • Thread starter Thread starter Ken Valenti
  • Start date Start date
K

Ken Valenti

I have a table that has the ID set as Number with field size Double (It's the
Key, required no duplicates).

I have two pieces of data
1492 (Some Integer)
39797.6002777778 (Some Date Stored as Number)

The SQL Code:
SELECT SupFields.ProjectData_ID FROM SupFields WHERE
(((SupFields.ProjectData_ID)=1492));

Returns 1492 But if I replace 1492 with 39797.6002777778, it returns nothing.

How can I get this SQL to work & return both numbers?
 
When you get down to that many decimal points, Access can get flakey. You
might want to consider changing the data type to Decimal.

Please test this in a copy of the database before changing the table.
 
I have a table that has the ID set as Number with field size Double (It's the
Key, required no duplicates).

I have two pieces of data
1492 (Some Integer)
39797.6002777778 (Some Date Stored as Number)

The SQL Code:
SELECT SupFields.ProjectData_ID FROM SupFields WHERE
(((SupFields.ProjectData_ID)=1492));

Returns 1492 But if I replace 1492 with 39797.6002777778, it returns nothing.

How can I get this SQL to work & return both numbers?

Doubles are stored as a 64-bit binary number with an exponent and a mantissa;
they are approximations. Just as the fraction 1/7 cannot be displayed exactly
as a decimal, many decimal fractions cannot be displayed exactly as a Double.
You get about 14 digits of precision, and your example has 15, so you may be
at the limits of what a Double is capable of storing!

What kind of data requires a mix of integer and Double (Date/Time!?) fields
*as the Primary Key*?
 
Back
Top