
Create a Stored Procedure from code.
How about using sp_ExecuteSql with your dynamically created sql statement as
the parameter.
like str = "create procedure my_NewProc as Select * from mytable"
sp_executesql str
Quote:
> We have a feature in our app that generates all the code needed to create
a
> stored procedure. At the moment this code is emailed to the DBA and they
run
> it through query analyzer.
> How can we create the stored procedure directly?