You can create a stored procedure from an existing SQL statement
in the Data Project Explorer.
- Switch to the Data perspective.
- In the Database Explorer, right-click an SQL statement in the SQL
Scripts folder under a data development project, and select Generate
Stored Procedure. A wizard opens, with the SQL
statement initialized to the SQL statement that you selected.
- Complete the steps of the wizard.
The wizard creates the stored procedure and adds it to the Stored
Procedures folder, and the stored procedure opens in the routine
editor.