As an alternative to creating a procedural object skeleton with one of the create procedural object wizards and then editing the skeleton procedure, you can create a SQL file and then create the procedural object from the SQL file.
To create a procedural object from a SQL file:
Create a new SQL file using the New SQL File wizard, or open an existing SQL file.
If the SQL file is not yet connected to a database, right-click in the SQL file, choose Attach Connection Profile (Ctrl-Alt-A) from the context menu, and specify a new or existing profile in the Select Profile for the Editor dialog.
Insert the procedural object skeleton by clicking in the editor at the beginning of the SQL file and using one of these methods:
Choose Database Tools|Insert| procedural object from the main menu bar.
The procedural object can be Procedure, Function, Trigger, or Event.
Right-click and choose Insert| procedural object from the context menu.
Click the Insert| procedural object button on the main toolbar.
Use the Create procedural object Skeleton wizard to create the procedural object skeleton.
Click Finish to insert the skeleton into the SQL file.
Enter SQL statements in the procedural object skeleton in SQL Editor.
Select the entire procedural object definition in the editor.
Right-click and choose Execute Selected Text from the context menu.
The procedural object is created in the associated database. SQL Results view shows the SQL statement that creates the object.
Right-click the parent folder for the object and click Refresh.
The object appears in the folder in Database Explorer.
Creating an ASE Stored Procedure
Creating an ASA Stored Procedure
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com