PRB: Cannot Insert Money/Float Larger Than 2147483647

ID: Q67407


The information in this article applies to:
  • Microsoft SQL Server for OS/2, version 4.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 :


Last Reviewed: March 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.