You can edit a procedural object to modify or add more SQL statements. You may have created the skeleton for the object, and then added the body of the procedural object either manually or by using one of the editing tools, Visual SQL or Content Assist, to aid you in creating SQL constructs. Additionally, you may want to edit existing procedural objects in a similar way.
Open an existing procedural object from Database Explorer.
You can use SQL Editor to edit procedural objects in conjunction with the editing tools by placing the cursor in the SQL Editor where you first want to insert SQL statements.
Editing Manually
Start typing.
Using Visual SQL
To create a new SQL select, insert, update or delete statement at the current cursor location, access Visual SQL from the editor's context menu by right-clicking and selecting any of the four SQL commands to be used.
Using Content Assist
In SQL Editor, use Ctrl-Space to bring up a list of syntax options available to you at the cursor point in your SQL code. Select the appropriate syntax to enter into the code by double-clicking it or by pressing Enter. Alternatively, an auto-invocation feature displays appropriate syntax lists when you pause after typing in certain characters, for example, '.', ',', '@'. These lists are more specific to the context and allow you to view, for example, a list of all table names in a database.
When you are finished editing, you can then save the resulting procedural object definition either as a SQL file or to a database using Save to Database or Save As.
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com