Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: sp and conditional temp table
Message
 
 
À
23/05/2005 05:15:16
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01016662
Message ID:
01016783
Vues:
11
Fabio,

I'm not exactly sure what you are calling a bug here, there's nothing conditional about the temp table itself, it will have to exist in the context of the calling SP for the code below to work at all. But anyway this code compiles and executes without error:
CREATE	PROCEDURE dbo.test1
	@choice bit = 0
as
	if @choice=0
		insert into #temptable SELECT 1 x
	else
		insert into #temptable SELECT 0 x
>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
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform