BUG: SELECT INTO with Many UNION Clauses Returns Error 702

Last reviewed: July 16, 1997
Article ID: Q171416
The information in this article applies to:
  • Microsoft SQL Server, version 6.5
BUG #: 16990 (6.5)

SYMPTOMS

A SELECT INTO statement that takes values from many tables using the UNION operator returns error 702 when the number of UNION clauses exceeds 21.

WORKAROUND

To work around this problem, split the UNION clauses to create temporary tables and then UNION the contents of the temporary tables.

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 following is the text of error 702:

   Msg 702, Level 20, State 1
   Memory request for xx bytes exceeds the size of single page of 2044
   bytes. The SQL Server is terminating this process.

Against SQL Server 6.5 Service Pack 2 (build 6.50.0240), the table from the SELECT INTO is created, but it is a 'stranded' table that cannot be dropped. If you try to drop it, the table returns the following error:

   Msg 3701, Level 11, State 1,
   Cannot drop the table '%s', because it doesn't exist in the system
   catalogs.

A CREATE TABLE or SELECT INTO statement using the same name returns the following error:

   Msg 2714, Level 16, State 1,
   There is already an object named '%' in the database.

Against SQL Server 6.5 Service Pack 3 (build 6.50.0258), the same behavior occurs, but the table can be dropped normally afterwards.


Keywords : kbbug6.50 kbusage SSrvTran_SQL
Version : 6.5
Platform : WINDOWS
Issue type : kbbug
Resolution Type : kbworkaround


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