Skip to main content

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.

UPPER

UPPER


UPPER(string_to_transform)

Returns the input string, transformed to uppercase. This function is not unicode aware.

Parameters

  • string_to_transform: The string to transform.

Returns

The uppercase version of the string.

LOWER

LOWER


LOWER(string_to_transform)

Returns the input string, transformed to lowercase. This function is not unicode aware.

Parameters

  • string_to_transform: The string to transform.

Returns

The lowercase version of the string.