Try OpenEdge Now
skip to main content
SQL Development
User Defined Functions
 

User Defined Functions

OpenEdge SQL provides support for User Defined Functions(UDF) which allow users to extend SQL functionality. A User Defined Function contains the logic, accepts the input parameters, and returns a scalar value as the result. User Defined Functions can help reduce network traffic. A complex set of logic that has the potential to filter out a large portion of result set rows, like a Regular Expression, which cannot be represented as a single scalar expression can be expressed as a User Defined Function. User Defined Functions allow users the advantage of having modularity in their code and also provides the flexibility of reusing UDF.
The process of creating a User Defined Function (UDF) is similar to that of created a stored procedure. There are input parameters and the body of the UDF (its program logic) is written in Java, with all the power of Java. A UDF is used like a SQL function, such as a SUBSTRING, and is fully integrated with query execution.
* Working with User Defined Functions
* Semantics and Limitations
* Permissions to create a UDF