sybase 'drop procedure'. can I get it to take a parameter instead of a naked proc name?

Posted by Michael Wilson on Stack Overflow See other posts from Stack Overflow or by Michael Wilson
Published on 2010-05-03T14:50:09Z Indexed on 2010/05/03 14:58 UTC
Read the original article Hit count: 205

Happy Monday o/

I'm looking to do the following within a stored proc

  select @parameter="fooproc"
  drop procedure @parameter

instead of

  drop procedure fooproc

But it's choking with a syntax error. Is there some way I can bend this to my will? I would've expected to be able to do this.

I've tried a few permutations of type declaration of @parameter to no avail.

Thoughts?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sybase