Creates a Cirro function reference which maps to an existing function or functions on remote systems.


CREATE REMOTE FUNCTION <cirroFunctionDefinition>
RETURNS returnDataType
FOR <remoteFunctionDefinition> [ , ...n ] ;

[ cirroSystemName. ] [ cirroDatabaseName. ] [ cirroSchemaName. ] cirroFunctionName ( <cirroParameterDefinition> [ , ...n ] )

cirroParameterName cirroDataType

remoteFunctionName { remoteParameterName [ , ...n] }
ON { TYPE | SYSTEM } typeOrSystemName


  • cirroSystemName: The Cirro system where the function is created.

    • If cirroSystemName is not provided, the system defaults to “HUB”.
  • cirroDatabaseName: The Cirro database on cirroSystemName where the function is created.

    • cirroDatabaseName must exist on the specified system, or on “HUB” if cirroSystemName is not provided.

    • If cirroSystemName is either “HUB” or not provided and cirroDatabaseName is not provided, the database defaults to “home”.

  • cirroSchemaName:: The Cirro schema on cirroSystemName where the function is created.

    • If provided, cirroSchemaName must exist on cirroSystemName.
  • cirroFunctionName: The name of the function on the Cirro system.

    • functionName should be a SQL92-compliant identifier and unique at this data source and location.
  • cirroParameterName: The name of the parameter.

    • This must be a valid SQL92 identifier and unique within this Cirro function.
  • cirroDataType: The data type of the parameter.

    • The number of cirroDataType parameters must match the number of remoteParameters in the remote function.

    • cirroDataType must be one of the supported Cirro data_types.

  • returnDataType: The data type for the returned value.

  • remoteFunctionName: The name of the existing remote function which will be called from the Cirro function.

  • remoteParameterName: A parameter name from the existing remote function referenced in remoteFunctionName.

    • When a single quote (‘) encapsulates remoteParameterName, parameters can be provided in the form “{parameter}”, and the variable input value will replace the parameter on function call.
  • TYPE | SYSTEM: The type or the system where the remote function already resides. typeOrSystemName: The name of the type or system where the function resides.


  • Returns the same data defined by the remote function



  • For example, in “dbo.ceiling(‘14 + {parm} + {parm1} + 25’)”, the value might be replaced with replaced with dbo.ceiling(14 + 33 + inventory.dbo.column1 + 25), if parm is 33 and parm1 is inventory.dbo.column1.