Microsoft KB Archive/101666: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 20: | Line 20: | ||
== SYMPTOMS == | == SYMPTOMS == | ||
On page 292 of Transact-SQL | On page 292 of Transact-SQL "User's Guide," it is incorrectly stated that: | ||
<pre> If you execute a procedure that calls another procedure, the called | <pre> If you execute a procedure that calls another procedure, the called | ||
Line 67: | Line 67: | ||
</span><br /> | </span><br /> | ||
<br /> | <br /> | ||
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED | 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.</blockquote> | ||
|} | |} | ||
Last reviewed: April 28, 1997<br /> | Last reviewed: April 28, 1997<br /> | ||
© 1998 Microsoft Corporation. All rights reserved. [[../cpyright|Terms of Use.]]<br /> | © 1998 Microsoft Corporation. All rights reserved. [[../cpyright|Terms of Use.]]<br /> |
Latest revision as of 09:19, 20 July 2020
BUG: Docerr: Nested Stored Procedure and Temporary ObjectsLast reviewed: April 28, 1997 |
The information in this article applies to:
BUG# 8899 (4.2) SYMPTOMSOn page 292 of Transact-SQL "User's Guide," it is incorrectly stated that: If you execute a procedure that calls another procedure, the called procedure can access all objects except temporary tables created by the first procedure. However, the called procedure can access the temporary tables created by the parent procedure. Therefore, the correct statement should be: If you execute a procedure that calls another procedure, the called procedure can access all objects created by the first procedure. However, there is one exception to this case. When the called procedure contains a conditional CREATE TABLE statement for the same temporary table name, then the called procedure fails to find the temporary object created by calling procedure. ExampleFor example, consider the following where proca is the calling procedure and procb is the called procedure: create proc proca as create table #t1 (i int) execute procb go create table #t1 (i int) go create proc procb as if not exists (select name from tempdb..sysobjects where substring(name,1,3)='#t1') create table #t1 (i int) select * from #t1 go drop table #t1 go execute proca go In this case, the execution of procedure proca fails indicating that the object #t1 cannot be found. However, if there is no CREATE statement in the IF EXIST clause, then the above script executes without any errors. |
Additional query words: |
Last reviewed: April 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.