Link to home
Start Free TrialLog in
Avatar of Roger Alcindor
Roger Alcindor

asked on

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.

ASKER CERTIFIED SOLUTION
Avatar of JoeNuvo
JoeNuvo
Flag of Viet Nam image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger Alcindor
Roger Alcindor

ASKER

Thanks for your help