skip to main content
Table functions : Example
 

Example

Suppose you have a CURVALUE table function with varchar columns. In this table:
The number of columns is equivalent the number of the parameters passed while calling the table function.
The value of the parameter is treated as the name of the column for the table function.
CURVALUE returns a maximum of 5 rows. If the number of arguments is greater than 5, the IP reports an error during the IP SCHEMA call.
The CURVALUE table function is a sample implementation of the following user scenarios:
A sample implementation that shows how to distinguish between a table and a table function when they have the same name.
A sample implementation for handling the input parameters as varchar.
A sample implementation for adding an index to the table functions to perform optimized query processing.
Note: The sample CURVALUE table function can be found at: <installdir>\ip\oac\example3Ex
See Providing schema for CURVALUE table function for an example that demonstrates how IP provides schema information and arguments of the CURVALUE table function to the OpenAccess SDK.