MSQuery: Data Not Sorted or Sorted Incorrectly

Last reviewed: September 12, 1996
Article ID: Q112727
The information in this article applies to:
  • Microsoft Query for Windows, version 1.0
  • Microsoft Excel for Windows, version 5.0

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


KBCategory: kbusage kbprb kbtool
KBSubcategory: xlquery

Additional reference words: 5.00 MS Query sort float Query Tool




THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.