BUG: Creating Temp Table in SEM Causes Error 208

Last reviewed: May 2, 1997
Article ID: Q141974

The information in this article applies to:
  • Microsoft SQL Server, version 6.0
BUG# NT: 11526 (6.00)

SYMPTOMS

Creating a temporary table outside a stored procedure will generate the following message:

   Error 208: Invalid Object Name '<temp table>'

You can encounter this problem when you use the SQL Enterprise Manager option "Manage Stored Procedures."

WORKAROUND

Use a query window to execute scripts containing temporary tables created outside stored procedures.

STATUS

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

MORE INFORMATION

The following three scenarios define the problem"

  1. Put the following code in the 'Manage Stored Procedures' window:

    create table #t1(a int) go create procedure test as select * from #t1 go

This will produce the following error:

   Error 208: Invalid Object Name '#t1'

NOTE: It does not matter if the table in the create statement is different
      from the table referenced in the stored procedure. The following
      returns the same error:

         create table #t2(a int)
         go
         create procedure test as
         select * from #t1
         go

  • If no temp tables are created outside the stored procedure, it works fine.

    create procedure test as select * from #t1 go

  • Creating a temp table without creating a stored procedure works fine.

    create table #t1(a int) go


  • Additional query words: sql6 winnt sem sproc
    Keywords : kbbug6.00 kbprg SSrvEntMan SSrvStProc
    Version : 6.0
    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: May 2, 1997
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.