June 10, 2003 at 9:39 am
From QA ver. 8.00.760
CREATE TABLE #s1(seqnum int)
insert into #s1 values (1)
drop #s1
Run above code with Set Showplan_text on
returns:
Server: Msg 208, Level 16, State 1, Line 2
Invalid object name '#s1'.
John Zacharkan
John Zacharkan
June 10, 2003 at 12:15 pm
From Books Online:
quote:
The setting of SET SHOWPLAN_TEXT is set at execute or run time and not at parse time.When SET SHOWPLAN_TEXT is ON, SQL Server returns execution information for each Transact-SQL statement without executing it. After this option is set ON, information about all subsequent Transact-SQL statements is returned until the option is set OFF. For example, if a CREATE TABLE statement is executed while SET SHOWPLAN_TEXT is ON, SQL Server returns an error message from a subsequent SELECT statement involving that same table; the specified table does not exist. Therefore, subsequent references to this table fail.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply