BUG: Table Populated With Zeros in the Identity Column

Last reviewed: March 17, 1998
Article ID: Q155795
The information in this article applies to:
  • Microsoft SQL Server, version 6.5
BUG #: Windows NT: 15764 & 16813 (6.50)
                   15661 (sql 6.00)

SYMPTOMS

When you Insert into a table with an identity column using either

   Select with "order by" and an outer join

   -or-

   Select with distinct and an outer join

the table becomes populated with zeros in the identity column.

STATUS

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

MORE INFORMATION

The left outer join syntax also results in the problem mentioned above. The "order by" clause must be present and the column "ordered by" must not be in Select list. The following is a sample query:

   Insert into tabl(id) select authors.au_id from authors ,titleauthor
   where authors.au_id *= titleauthor.au_id
   order by authors.au_lname
   go
   select * from tbl
   go
Keywords          : kbbug6.50 SSrvProg kbprg
Version           : 6.5
Platform          : WINDOWS


================================================================================


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