Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add a stored procedure to my database?
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01150504
Message ID:
01150517
Views:
35
The book is incorrect. When you follow steps you outlined below, you get a T-SQL template to create a sproc. Keith explained in other thread how to replace template placeholders with values you want. After you do that, you'll have T-SQL script to create the sproc. The sproc itself is a part of the script. You can save script (SAVE) for future modifications. EXECUTE script to add sproc to the database.

>I am having a tough time understanding and doing something that should be very simple. I want to add a stored procedure to my database. I am following steps in the book "Mastering SQL Server 2005" but they have one screen shot that I don't see.
>
>Here is what I do:
>
>1. Open MSFT SQL Server Management Studio
>2. Go to Databases -> MyDatabase -> Programmability.
>3. Right-click on folder icon of Stored Procedures
>4. This brings up a window MyPcName.MyDatabase - SQLQuery1.sql.
> But the book has it differently from this point.
> The book in this step shows a window captioned "New Procedure ... " Their screen has fields for naming the stored procedure and a few other settings. Then the book says, click on Save and you are all done creating your stored procedure.
>
>But when I click on the Save button I am prompted to save the query in a project. And if I do, I don't see this as a stored procedure in my database. The book clearly shows a picture where the stored procedure should appear in the tree under the Stored Procedure folder icon.
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform