May 7, 2013 at 11:07 am
Hi Everyone,
I got an error when I try to create this procedure, when I remove one ligne (like comment one ligne) it's ok, but when I add both of them, I got the error below.
Please Help me.
create procedure SALEM_DETACHE @TableName varchar(50)
as
Begin
ALTER DATABASE @TableName SET SINGLE_USER WITH ROLLBACK
EXEC master.dbo.sp_detach_db @dbname = @TableName, @skipchecks = 'false'
end
Msg 102, Level 15, State 1, Procedure SALEM_DETACHE, Line 6
Syntaxe incorrecte vers '@TableName'.
Msg 319, Level 15, State 1, Procedure SALEM_DETACHE, Line 6
Syntaxe incorrecte près du mot clé 'with'. Si l'instruction est une expression de table commune, une clause xmlnamespaces ou une clause de contexte de suivi des modifications, l'instruction précédente doit se terminer par un point-virgule.
May 7, 2013 at 12:35 pm
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply