Mapping substring functions: SubStringFuncMapper element
The SubStringFuncMapper element is used for customizing the mappings of the functions listed in Table 10‑8. The table also shows the default template for each function.
Table 10‑8 Default templates for mapping substring functions
Substring function
Operand data types
Default template
SUBSTRING
<VARCHAR>, <INTEGER>, <INTEGER>
{FN SUBSTRING
($P0, $P1, $P2)}
LEFT
<VARCHAR>, <INTEGER>
{FN LEFT ($P0, $P1)}
RIGHT
<VARCHAR>, <INTEGER>
{FN RIGHT ($P0, $P1)}
POSITION
<VARCHAR>, <VARCHAR>
{FN LOCATE ($P0, $P1)}
Example: Mapping the POSITION function
You must map the POSITION function because your driver does not implement the escape sequence {FN LOCATE ($P0, $P1)}:
<SubStringFuncMapper>
<FunctionMappings>
<FunctionMapping FunctionName="POSITION">
POSITION ($P0, $P1)
</FunctionMapping>
</FunctionMappings>
</SubStringFuncMapper>