SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual540440-003
9-155
UCASE Function
UCASE Function
Considerations for UCASE
Examples of UCASE
The UCASE function upshifts characters. UCASE can appear anywhere in a query
where a value can be used, such as in a select list, an ON clause, a WHERE clause, a
HAVING clause, a LIKE predicate, an expression, or as qualifying a new value in an
UPDATE or INSERT statement. The result returned by the UCASE function is equal to
the result returned by the UPPER or UPSHIFT function.
For UCS2 character-expression, the UCASE function upshifts all lowercase or title
case characters to uppercase and returns a character string. If the argument is of type
CHAR(n) or VARCHAR(n), the result is of type VARCHAR(min(3n, 2048)).
A lowercase character is a character that has the “alphabetic” property in Unicode
Standard 2 and whose Unicode name includes lower. An upper case character is a
character that has the “alphabetic” property and whose Unicode name includes upper.
A title case character is a character that has the Unicode “alphabetic” property and
whose Unicode name includes title.
UCASE returns a string of either fixed-length or variable-length character data,
depending on the data type of the input string.
You cannot use the UCASE function on KANJI or KSC5601 operands.
UCASE is an SQL/MX extension.
character-expression
is an SQL character value expression that specifies a string of characters to
upshift. See Character Value Expressions on page 6-37.
Considerations for UCASE
Table 9-2 lists all one-to-one mappings for the UCS2 character set. In addition, it is
possible for the result string to be longer than that of the source because some of the
title case characters can be mapped to multiple characters.
Table 9-3 lists UCS2 characters with two-character uppercase mapping.
Table 9-4 lists UCS2 characters with three-character uppercase mapping.
Characters not listed in these tables use themselves as their uppercase mappings.
UCASE (character-expression)