Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: sp and conditional temp table
Message
From
23/05/2005 05:52:18
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
To
23/05/2005 05:15:16
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
01016662
Message ID:
01016667
Views:
9
I'm not sure what your doing so this may not be what your looking for.

But how about:

CREATE PROCEDURE dbo.test1
@choice bit = 0
as
exec('select CAST( ' + @choice + ' as varchar(1)) X from #temptable')

You have vastly more experience than me so excuse the answer if its not what your after.

Jon

>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
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform