SQL server 2005 Execute SQL

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)
AS
BEGIN
     ExecuteSQL(@param1);
END

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.

LVL 2
Roger AlcindorAsked:
Who is Participating?
 
JoeNuvoCommented:
it's not ExecuteSQL

just Execute  or  Exec
0
 
Roger AlcindorAuthor Commented:
Thanks for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.