Creating a Table UDF or Table Parameterized Function

Set up an external table-valued user-defined function or table parameterized function in C/C++ or an external table-valued user-defined function in Java on a Sybase IQ server.
Prerequisites
Task

For detailed information on UDFs, see User-Defined Functions in the Sybase IQ documentation set.

  1. In the Perspective Resources view, select the resource and select Resource > Administration Console.
  2. In the Administration Console, expand IQ Servers > Other Objects.
  3. Select Procedures, click the drop-down arrow that appears to the right, and select New Table UDF/TPF.
  4. In the Create Table UDF/TPF wizard, select the Sybase IQ server on which the procedure is to reside.
  5. Select a user or group to own the procedure.
  6. Enter a name for the procedure.
  7. Select the type of procedure to create.
  8. Check Use SQL template if you want the wizard to provide comments with syntax examples to help you define parameters and results. Leave the box unchecked if you want to use the Return Structure page to define the result.
  9. If you chose not to use the SQL template, define the result on the Return Structure page.
  10. On the SQL page, edit the code provided by the wizard.
    1. Define input parameters using the format provided.
    2. Replace the placeholder external name at the end of the query with a real name that follows the format of the placeholder.
    3. Make any other changes needed to complete your procedure.
  11. (Optional) Enter a comment describing the procedure.
    Comments can include both HTML and Javadoc tags, so you can incorporate them into your generated database documentation.
  12. Click Finish to save the procedure.
The new procedure appears in the Procedures list in the right pane of the Administration Console.
Related tasks
Listing Procedures
Creating a Procedure
Viewing and Modifying a Procedure
Granting or Revoking Permissions on a Procedure
Generating DDL for a Procedure
Deleting a Procedure
Installing a Java Class or JAR File into a Sybase IQ Database