PRB: Cannot Insert Money/Float Larger Than 2147483647

Last reviewed: April 25, 1997
Article ID: Q67407

The information in this article applies to:

  - Microsoft SQL Server version 4.2 for OS/2
  - Microsoft SQL Server version 4.2

SYMPTOMS

Trying to insert or update a value greater than the largest allowed integer value, 2,147,483,647, into a MONEY or FLOAT field results in the following error message:

   The integer value xxx is out of the range of machine
   representation (4 bytes).

WORKAROUND

A constant of the form 2147483648 is interpreted by SQL Server as an integer. Since the value is being treated as an integer, it cannot exceed the largest legal value for that type.

Either of the following options will resolve this problem:

   1. Add a decimal at the end to have SQL Server recognize the number
      as a float value: 2147483648.00

   2. Place a dollar sign in front to have SQL Server recognize the
      number as a money value: $2147483648


Additional query words: Windows NT
Keywords : kbother SSrvTrans SSrvWinNT
Version : 4.2 | 4.2
Platform : OS/2 WINDOWS
Issue type : kberrmsg


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: April 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.