ASA SQL User's Guide
Using Procedures, Triggers, and Batches
This section provides some pointers for developing procedures.
Check if you need to change the command delimiter
Remember to delimit statements within your procedure
Use fully-qualified names for tables in procedures
Specifying dates and times in procedures
Verifying that procedure input arguments are passed correctly