MSQuery: Data Not Sorted or Sorted Incorrectly

ID: Q112727


The information in this article applies to:


SYMPTOMS

In Microsoft Query, data may not be sorted correctly or may not be sorted at all when floating-point values are in the selected column.


CAUSE

In Microsoft Query, when you use arithmetic operations and the returned values are very small, you may receive rounding errors.


STATUS

This behavior is not a bug or limitation of Microsoft Excel. This result is due to the IEEE floating-point standard that requires that numbers be stored in binary format. These binary numbers cannot be stored with perfect accuracy, and therefore, they may not be interpreted correctly for sorting.


MORE INFORMATION

For more information on floating-point arithmetic as it relates to Microsoft Excel and the IEEE standard, query on the following words in the Microsoft Knowledge Base:


   floating and point and values and excel and ieee 


Additional query words: MS Query sort float Query Tool


Keywords          : xlquery 
Version           : 5.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: May 2, 1999