BUG: Error 403 or 602 on Table Insert of UNION of Views

Last reviewed: April 30, 1997
Article ID: Q133089

The information in this article applies to:
  • Microsoft SQL Server, version 4.21a
BUG# NT: 9377 (4.21a)

SYMPTOMS

An INSERT into a table of a SELECT on a view/UNION/view may fail with either an error 403 or an error 602.

An INSERT into a table (temporary or permanent) of a UNION ALL of two or more views may fail with the error:

   Msg 403, Level 16, State 1:
   Invalid operator for datatype op: UNKNOWN TOKEN type: <datatype>

A message will be generated for many, but not all, datatypes used in the column definitions.

An INSERT into a table of a UNION of secondary views (a view on a view) may fail with the error:

   Msg 602, Level 21, State 3:
   Could not find row in Sysindexes for dbid '4', object
   '1932533918', index '0'. Run DBCC CHECKTABLE on Sysindexes.
   The SQL Server is terminating this process.

NOTE: The dbid and object vary from case to case.

WORKAROUND

Break the UNION into individual INSERT statements. For example, you can rewrite the following query:

   insert into table
   select * from view1
   UNION ALL
   select * from view2

to look like:

   insert into table
   select * from view1
   insert into table
   select * from view2

STATUS

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

This problem does not occur in SQL Server version 6.0.


Additional query words: Windows NT
Keywords : kbbug4.21a kbother SSrvProg SSrvWinNT
Version : 4.21a
Platform : 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 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.