SQL function -- SQL statements

The SQL statements tab contains the code for the external SQL program that you are defining as a function. You can use the SQL statement examples and fill in the necessary information to make coding SQL easier.

  1. If you have existing SQL code that you want to use, paste it into the Statements field.
  2. If you do not have existing SQL code that you want to use, select a statement from the SQL statement examples list, click Insert, and fill in the placeholders with your information. Repeat this step for each statement you want to add.

If the SQL function is completely defined, click OK.

Or select:

General

Parameters

Note: After an SQL function has been created, the SQL statements cannot be changed. Also, no compile listing is generated when the function is created. If logic errors are later detected, the function must be deleted and redefined to change the SQL code. You should consider creating and testing your SQL statements elsewhere before creating them as an SQL Function.