bonjour
je cherche a effacer une table en utilisant le drop table @MaVariable
mais cela n'a pas l'air de marcher, il me retourne une erreur
Pourquoi?
merci a+
SET @SQLString = 'DROP TABLE @MaTable' SET @ParmDefinition = '@MaTable nvarchar(200)' EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable
Phil. ________________________________________________________ Philippe TROTIN http://blogs.msdn.com/ptrotin Microsoft Services France http://www.microsoft.com/france
"Etudiant" wrote in message news:#
bonjour je cherche a effacer une table en utilisant le drop table @MaVariable mais cela n'a pas l'air de marcher, il me retourne une erreur Pourquoi? merci a+
SET @SQLString = 'DROP TABLE @MaTable'
SET @ParmDefinition = '@MaTable nvarchar(200)'
EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable
Phil.
________________________________________________________
Philippe TROTIN http://blogs.msdn.com/ptrotin
Microsoft Services France http://www.microsoft.com/france
"Etudiant" <user@domain.invalid> wrote in message
news:#xgEbqjAFHA.2112@TK2MSFTNGP09.phx.gbl...
bonjour
je cherche a effacer une table en utilisant le drop table @MaVariable
mais cela n'a pas l'air de marcher, il me retourne une erreur
Pourquoi?
merci a+
SET @SQLString = 'DROP TABLE @MaTable' SET @ParmDefinition = '@MaTable nvarchar(200)' EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable
Phil. ________________________________________________________ Philippe TROTIN http://blogs.msdn.com/ptrotin Microsoft Services France http://www.microsoft.com/france
"Etudiant" wrote in message news:#
bonjour je cherche a effacer une table en utilisant le drop table @MaVariable mais cela n'a pas l'air de marcher, il me retourne une erreur Pourquoi? merci a+
SET @SQLString = 'DROP TABLE @MaTable' SET @ParmDefinition = '@MaTable nvarchar(200)' EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable
Phil. ________________________________________________________ Philippe TROTIN http://blogs.msdn.com/ptrotin Microsoft Services France http://www.microsoft.com/france
"Etudiant" wrote in message news:#
bonjour je cherche a effacer une table en utilisant le drop table @MaVariable mais cela n'a pas l'air de marcher, il me retourne une erreur Pourquoi? merci a+
SET @SQLString = 'DROP TABLE @MaTable'
SET @ParmDefinition = '@MaTable nvarchar(200)'
EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable
Phil.
________________________________________________________
Philippe TROTIN http://blogs.msdn.com/ptrotin
Microsoft Services France http://www.microsoft.com/france
"Etudiant" <user@domain.invalid> wrote in message
news:#xgEbqjAFHA.2112@TK2MSFTNGP09.phx.gbl...
bonjour
je cherche a effacer une table en utilisant le drop table @MaVariable
mais cela n'a pas l'air de marcher, il me retourne une erreur
Pourquoi?
merci a+
SET @SQLString = 'DROP TABLE @MaTable' SET @ParmDefinition = '@MaTable nvarchar(200)' EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable
Phil. ________________________________________________________ Philippe TROTIN http://blogs.msdn.com/ptrotin Microsoft Services France http://www.microsoft.com/france
"Etudiant" wrote in message news:#
bonjour je cherche a effacer une table en utilisant le drop table @MaVariable mais cela n'a pas l'air de marcher, il me retourne une erreur Pourquoi? merci a+
merci
Philippe T [MS]
Bonjour,
Pas de problème. C'est toujours un plaisir :-)
Phil. ________________________________________________________ Philippe TROTIN http://blogs.msdn.com/ptrotin Microsoft Services France http://www.microsoft.com/france
"Etudiant" wrote in message news:
Philippe T [MS] a écrit : > Bonjour, > > DECLARE @MySQL nvarchar(4000) > SET @MySQL = 'DROP TABLE ' + @MaVariable > EXEC(@MySQL) > > ou encore : > > DECLARE @SQLString nvarchar(4000) > DECLARE @ParmDefinition nvarchar(500) > > SET @SQLString = 'DROP TABLE @MaTable' > SET @ParmDefinition = '@MaTable nvarchar(200)' > EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable > > > Phil. > ________________________________________________________ > Philippe TROTIN http://blogs.msdn.com/ptrotin > Microsoft Services France http://www.microsoft.com/france > > "Etudiant" wrote in message > news:# > >>bonjour >>je cherche a effacer une table en utilisant le drop table @MaVariable >>mais cela n'a pas l'air de marcher, il me retourne une erreur >>Pourquoi? >>merci a+ > > > merci
Bonjour,
Pas de problème. C'est toujours un plaisir :-)
Phil.
________________________________________________________
Philippe TROTIN http://blogs.msdn.com/ptrotin
Microsoft Services France http://www.microsoft.com/france
"Etudiant" <user@domain.invalid> wrote in message
news:OahEUclAFHA.2572@TK2MSFTNGP10.phx.gbl...
Philippe T [MS] a écrit :
> Bonjour,
>
> DECLARE @MySQL nvarchar(4000)
> SET @MySQL = 'DROP TABLE ' + @MaVariable
> EXEC(@MySQL)
>
> ou encore :
>
> DECLARE @SQLString nvarchar(4000)
> DECLARE @ParmDefinition nvarchar(500)
>
> SET @SQLString = 'DROP TABLE @MaTable'
> SET @ParmDefinition = '@MaTable nvarchar(200)'
> EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable
>
>
> Phil.
> ________________________________________________________
> Philippe TROTIN http://blogs.msdn.com/ptrotin
> Microsoft Services France http://www.microsoft.com/france
>
> "Etudiant" <user@domain.invalid> wrote in message
> news:#xgEbqjAFHA.2112@TK2MSFTNGP09.phx.gbl...
>
>>bonjour
>>je cherche a effacer une table en utilisant le drop table @MaVariable
>>mais cela n'a pas l'air de marcher, il me retourne une erreur
>>Pourquoi?
>>merci a+
>
>
>
merci
Phil. ________________________________________________________ Philippe TROTIN http://blogs.msdn.com/ptrotin Microsoft Services France http://www.microsoft.com/france
"Etudiant" wrote in message news:
Philippe T [MS] a écrit : > Bonjour, > > DECLARE @MySQL nvarchar(4000) > SET @MySQL = 'DROP TABLE ' + @MaVariable > EXEC(@MySQL) > > ou encore : > > DECLARE @SQLString nvarchar(4000) > DECLARE @ParmDefinition nvarchar(500) > > SET @SQLString = 'DROP TABLE @MaTable' > SET @ParmDefinition = '@MaTable nvarchar(200)' > EXECUTE sp_executesql @SQLString, @ParmDefinition, @MaVariable > > > Phil. > ________________________________________________________ > Philippe TROTIN http://blogs.msdn.com/ptrotin > Microsoft Services France http://www.microsoft.com/france > > "Etudiant" wrote in message > news:# > >>bonjour >>je cherche a effacer une table en utilisant le drop table @MaVariable >>mais cela n'a pas l'air de marcher, il me retourne une erreur >>Pourquoi? >>merci a+ > > > merci