Ucase Function; Considerations For Ucase; Examples Of Ucase - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

UCASE Function

"Considerations for UCASE"

"Examples of UCASE"

The UCASE function upshifts alphanumeric characters. For non-alphanumeric characters, UCASE
returns the same character. 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
"UPSHIFT Function" (page
UCASE returns a string of fixed-length or variable-length character data, depending on the data
type of the input string.
UCASE is a Neoview SQL extension.
UCASE (character-expression)
character-expression
is an SQL character value expression that specifies a string of characters to upshift. See
"Character Value Expressions" (page
Considerations for UCASE
For a 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)), where the maximum length of VARCHAR is the
minimum of 3n or 2048, whichever is smaller.
A lowercase character is a character that has the "alphabetic" property in Unicode Standard 2
and whose Unicode name includes lower. An uppercase 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.
Tables that show the one-to-one mappings for the UCS2 character set are included in
(page
509).
Examples of UCASE
Suppose that your CUSTOMER table includes an entry for Hotel Oregon. Select the column
CUSTNAME and return in uppercase and lowercase letters by using the UCASE and LCASE
functions:
SELECT custname,UCASE(custname),LCASE(custname)
FROM sales.customer;
(EXPR)
-----------------
...
Hotel Oregon
--- 17 row(s) selected.
See
"LCASE Function" (page
For more examples of when to use the UCASE function, see
483).
255).
(EXPR)
-------------------
...
HOTEL OREGON
411).
"UPPER Function" (page 482)
(EXPR)
------------------
...
hotel oregon
"UPSHIFT Function" (page
or
Appendix A
483).
UCASE Function
481

Advertisement

Table of Contents
loading

Table of Contents