Mapping functions with different names

You can create a mapping between two functions (or a database function template and a data source function) that have different names.

About this task

To create a mapping between two functions with different names, issue the CREATE FUNCTION MAPPING statement:

Procedure

  1. Assign the name of the database function or function template to the function_name parameter.
  2. Specify a function mapping option called REMOTE_NAME and assign the name of the data source function to this option. The REMOTE_NAME must be less than 255 characters.

Example

Example: You want to map a user-defined function named UPPERCASE at an Oracle data source to the database function UCASE(CHAR). The Oracle data source server is called ORACLE2. You decide to name this function mapping ORACLE_UPPER. The syntax would be:
CREATE FUNCTION MAPPING ORACLE_UPPER FOR SYSFUN.UCASE(CHAR) 
    SERVER ORACLE2 OPTIONS 
    (REMOTE_NAME 'UPPERCASE')