Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: sp and conditional temp table
Message
From
23/05/2005 11:54:01
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
01016662
Message ID:
01016787
Views:
10
>
	SELECT 1 x INTO #TEMPTABLE WHERE 1=2
>	if @choice=0
>		INSERT INTO #TEMPTABLE SELECT 1
>	else
>		INSERT INTO #TEMPTABLE SELECT 0
>
>>Someone knows an setting in order to jump this stupid error,
>>and compile this simple sp:
>>
>>CREATE	PROCEDURE dbo.test1
>>	@choice bit = 0
>>as
>>	if @choice=0
>>		SELECT 1 x INTO #TEMPTABLE
>>	else
>>		SELECT 0 x INTO #TEMPTABLE
>>
Sergey,
this have the same problems
of others workarounds ( exec or conditional select ),
plus the INSERT transaction log slowdown.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform