Editing a User-Defined Function

Edit a user-defined function to change the parameters, permissions, or other properties.

Prerequisites 

Before you can edit a user-defined function, be sure the data server that contains the user-defined function is running, and you created and established a connection to the data server.

  1. In the Databases folder in Enterprise Explorer, under the database connection profile, expand the tree for a database, expand the Schemas folder and then the tree for the appropriate schema owner.
  2. Expand the User Defined Functions folder, right-click the user-defined function you want to edit, and select Edit.
  3. Edit the user-defined function properties.
    Editor Tab Description
    General
    • Change the Name.
    • Enter a description in the Comment field.
    • Specify Parameters and their corresponding datatypes, input or output status, and defaults. To delete a parameter, highlight it and click Delete. To delete all parameters, click Delete All. Use Up and Down to change the order of parameters listed.
    • Select a Return type.
    • Select On Exception Resume to use Transact-SQL error handling in the event of an exception or error.
    • Select Deterministic if the user-defined function does not need to be reevaluated every time it is used in a query.
    Source Manually edit the SQL code in the Source page. To display line numbers for the SQL code, right-click in the left margin, and choose Show Line Numbers.
    Permissions Set permissions for the user-defined function. You can specify Granted With Grant Option or Inherited permissions for the listed roles.
    DDL View the DDL for the user-defined function (read-only).
  4. Select File > Save from the main WorkSpace menu.
Related concepts
User-Defined Functions
Related tasks
Creating a SQL Anywhere or Sybase IQ User-Defined Function
Dropping a User-Defined Function
Renaming a User-Defined Function

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com