Managing String Case
AMPS provides the UPPER
and LOWER
functions to produce a string in a specific case. This can be useful when constructing fields, or when an expression needs case-insensitive comparisons against a group of values using the IN
clause.
As described above in String Comparison Functions, AMPS provides INSTR_I
and STREQUAL_I
functions for performing case-insensitive comparisons. In some cases, particularly when using strings with the IN
clause, it is more efficient to simply convert the string to a known case.
The UPPER
and LOWER
functions are not unicode-aware; these functions will not produce the correct data when used with multibyte characters. For example, you might compare an incoming field of unknown case to a set of known values as follows:
Function | Parameters | Description |
---|---|---|
| The string to transform | Returns the input string, transformed to uppercase. This function is not unicode aware. |
| The string to transform | Returns the input string, transformed to lowercase. This function is not unicode aware. |
Last updated