UPPER

The UPPER function returns a string in which all the characters have been converted to uppercase characters, based on the CCSID of the argument. Only SBCS and Unicode graphic characters are converted. The characters a-z are converted to A-Z, and characters with diacritical marks are converted to their uppercase equivalent, if any.

Read syntax diagramSkip visual syntax diagramUPPER(expression)

Refer to the UCS-2 level 1 mapping tables topic of the Globalization topic collection for a description of the monocasing tables that are used for this translation.

expression
An expression that specifies the string to be converted. expression must be any built-in numeric, character, Unicode graphic string. A numeric argument is cast to a character string before evaluating the function. For more information about converting numeric to a character string, see VARCHAR.

The result of the function has the same data type, length attribute, actual length, and CCSID as the argument. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

Note

Syntax alternatives: UCASE is a synonym for UPPER.

Examples

  • Uppercase the string 'abcdef' using the UPPER scalar function.
    SELECT UPPER('abcdef')
        FROM SYSIBM.SYSDUMMY1
    Returns the value 'ABCDEF'.
  • Uppercase the mixed character string using the UPPER scalar function.

    SELECT UPPER( Uppercase the mixed character string using the UPPER scalar function: 'ab shift-out C shift-in def')

        FROM SYSIBM.SYSDUMMY1

    Returns the value: Result of UPPER function: 'AB shift-out C shift-in DEF'