BUG: Real Datatype Allowing NULL Is Shown as Float

Last reviewed: April 29, 1997
Article ID: Q113289

The information in this article applies to:

  - Microsoft SQL Server version 4.2b for OS/2
BUG# OS/2: 1837 (4.2b)

SYMPTOMS

When a table is created with a real datatype column allowing NULL, sp_help shows float instead of real for the datatype. This does not happen when the column does not allow NULL.

For example, the following shows float instead of real for column f"":

  create table test (f real null)
  go
  sp_help test
  go

Column_name     Type            Length Nulls Default_name    Rule_name
--------------- --------------- ------ ----- --------------- --------------

f               float           4      1     (null)          (null)

WORKAROUND

You can manually change the usertype in syscolumns to 23.

For example:

   update syscolumns
   set usertype=23
   where type = 109 and usertype=8 and id=object_id('tablename')

STATUS

Microsoft has confirmed this to be a problem in SQL Server for OS/2 version 4.2b. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

This is caused by the a misrepresentation in syscolumns.

The entry in syscolumns for the column 'f' is shown as:

type                                     usertype
----                                     --------
109                                         8

Under Windows NT, the entry for "f" in syscolumns is correctly shown as:

type                                     usertype
----                                     --------
109                                         23

NOTE: This does not cause any impact on the actual data storage since the data length is still 4, which is correct for a real datatype.


Additional query words:
Keywords : kbprg SSrvTrans
Version : 4.2b
Platform : OS/2


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