Mapping string functions: BasicStringFuncMapper element
The BasicStringFuncMapper element is used for customizing the mappings of the functions listed in Table 11-7. The table also shows the default template for each function.
<VARCHAR>, <INTEGER>
<VARCHAR>, <VARCHAR>
Example: Mapping the CHAR_LENGTH function
The Actuate SQL CHAR_LENGTH function returns the length of a string including trailing spaces. The corresponding database function, however, ignores trailing spaces. To resolve this discrepancy, the following mapping appends an underscore (_) to the string, applies the database function LEN, and subtracts one:
<BasicStringFuncMapper>
  <FunctionMappings>
    <FunctionMapping FunctionName="CHAR_LENGTH">
      LEN ($P0 + '_') - 1
    </FunctionMapping>
  </FunctionMappings>
</BasicStringFuncMapper>

Additional Links:

Copyright Actuate Corporation 2012