PRSQL9012022: Can't Insert Money/Float Larger Than 2147483647

ID Number: Q67407

1.10 1.11

OS/2

buglist1.10 buglist1.11

Summary:

Problem ID: PRSQL9012022

SYMPTOMS

Trying to insert 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).

CAUSE

SQL Server is originally interpreting the value as an integer

instead of the MONEY or FLOAT data type. This occurs because the

value does not have a decimal or dollar sign ($) associated with

it. Since the value is being treated as an integer, it cannot

exceed the largest legal value for an integer.

WORKAROUND

Either of the following options will resolve this problem:

1. Add a decimal to the value to be inserted. (SQL Server will

treat the value as type float.)

2. Place a dollar sign in front of the value before inserting

(Money data type only).

STATUS

Microsoft has confirmed this to be a problem in SQL Server versions

1.1 and 1.11. We are researching this problem and will post new

information here as it becomes available.

Additional reference words: 1.10