I need to execute an SQL statement from within a stored procedure using the code from a parameter passed to the stored procedure. Something like:
create procedure myprocedure
@param1 char (100)
I can't find any reference to this in the SQL Server 2005 help but I know it exists. I can't remember the command/function name.
I am looking for a solution using Transact SQL - NOT using SQL Native Client programming.