-
Problem with kill statement
Forgive me for what may be a dumb question but i`m having trouble using the kill statement in a stored procedure. The problem is that i always get a syntax error when using the kill statement with a local variable as the parameter.
For example some part of the code is:
declare @myspid smallint
...
exec kill @myspid
...
Please help!
-
Problem with kill statement (reply)
On 10/25/98 1:28:10 PM, Noel wrote:
> Forgive me for what may be a dumb question but i`m having trouble using the
> kill statement in a stored procedure. The problem is that i always get a
> syntax error when using the kill statement with a local variable as the
> parameter.
I was really dumb after all, after searchin the documentation i`ve found the
correct syntax.
-
Mind telling us what that syntax you found was, please?
-
declare @id varchar(10), @cmd varchar(20)
set @id = '51'
set @cmd = 'kill ' + @id
exec(@cmd)
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|