String Function (string_function)

A string function (string_function) is a function that supplies an alphanumeric value as a result.

Syntax

<string_function> ::=
  <string_spec> || <string_spec>
| <string_spec> & <string_spec>
ALPHA     (<string_spec>[,<unsigned_integer>])
ASCII     (<string_spec>)
EXPAND    (<string_spec>,<unsigned_integer>)
GET_OBJECTNAME (<string_literal>)
GET_SCHEMA     (<string_literal>)
INITCAP   (<string_spec>)
LFILL     (<string_spec>,<string_literal>[,<unsigned_integer>])
LOWER     (<string_spec>)
LPAD      (<string_spec>,<expression>,<string_literal>[,<unsigned_integer>])
LTRIM     (<string_spec>[,<string_spec>])
MAPCHAR   (<string_spec>[,<unsigned_integer>][,<mapchar_set_name>])
REPLACE   (<string_spec>,<string_spec>[,<string_spec>])
RFILL     (<string_spec>,<string_literal>[,<unsigned_integer>])
RPAD      (<string_spec>,<expression>,<string_literal>[,<unsigned_integer>])
RTRIM     (<string_spec>[,<string_spec>])
SOUNDEX   (<string_spec>)
SUBSTR    (<string_spec>,<expression>[,<expression>])
TRANSLATE (<string_spec>,<string_spec>,<string_spec>)
TRIM      (<string_spec>[,<string_spec>])
UPPER     (<string_spec>)

<string_spec> ::= <expression>

Explanation

<string_spec> || <string_spec> or <string_spec> & <string_speccan be used to represent a concatenation (x||y or x&y).

Only expressions that produce an alphanumeric value are permitted as string specifications (string_spec).

See also:

Functions: Overview