You can use the New User-Defined
Function wizard to create DB2® user-defined
functions (UDFs) in SQL.
The wizard creates the user-defined function
and adds it to the
User-Defined
Functions folder, and the user-defined function opens
in the routine
editor.
Note: The New User-Defined Function (UDF) wizard does not support
all
data types on all DB2 servers. When creating a table
UDF, the wizard recommends
SQL data types for the data returned for each column. If the wizard
is unable
to map a corresponding data type for a column because that data type
is not
supported, the Data type column on the Results page of the SQL Results
view
will show "not mapped". To fix this, open the generated user-defined
function
in the editor and change the data type manually.
By default,
creating
the user-defined function does not register the user-defined function
on the
database. To register the user-defined function on the database, you
must
deploy it.