Creating a function mapping for a specific data source type and version

You can create a mapping to a function for all data sources that use a specific version of the data source type.

Before you begin

The privileges held by the authorization ID of the statement must have SYSADM or DBADM authority.

About this task

Restrictions

You cannot override the existing function mappings or create new mappings for non-relational data sources.

Procedure

To create a mapping for a specific data source type and version, use the CREATE FUNCTION MAPPING statement.

Example: Map a database function template to a Sybase user-defined function for all Sybase data sources that use Version 15

The template is called SYB_STATS and belongs to a schema called EARTH. The Sybase user-defined function is called STATISTICS and belongs to a schema called MOON. The CREATE FUNCTION MAPPING is:
CREATE FUNCTION MAPPING SYBASE_STATS  
   FOR EARTH.SYB_STATS ( DOUBLE, DOUBLE )  
   SERVER TYPE SYBASE VERSION 15 
   OPTIONS (REMOTE_NAME 'MOON.STATISTICS')