Dont think much ... Open Query Analise and press F1 :)
Search for CREATE PROCEDURE
Got it ....
Take the SQL Statement that you want to make the stored procedure and put the below line above it. Then run the script. This will create a stored procedure based on the name you provided in the database.
<pre>CREATE PROCEDURE <i>YourProcedureName</i> AS</pre>
You should also read my blog entry on <a href="http://itknowledgeexchange.techtarget.com/sql-server/back-to-basics-stored-procedures-the-work-horse-of-the-database/">Stored Procedures</a>.
Last Wiki Answer Submitted: May 15, 2009 4:55 am by Denny Cherry64,520 pts.