General Character Functions


Table: General Character Functions lists the OLAP DML statements that you use to manipulate text based on characters.

General Character Functions

Statement Description
ASCII
Returns the decimal representation of the first character of an expression.
BLANKSTRIP
Removes leading or trailing blank spaces from text values.
CHANGECHARS
Changes one or more occurrences of a specified string in a text expression to another string.
EXTCHARS
Extracts a portion of a text expression using characters.
FINDCHARS
Returns the character position of the beginning of a specified group of characters within a text expression.
GREATEST
Returns the largest expression in a list of expressions.
INITCAP
Returns a specified text expression, with the first letter of each word in uppercase and all other letters in lowercase.
INSCHARS
Inserts one or more characters into a text expression.
INSTR
Searches a string for a substring using characters and returns the position in the string that is the first character of a specified occurrence of the substring.
JOINCHARS
Joins two or more text values, as characters, as a single line.
LEAST
Returns the smallest expression in a list of expressions.
LIKECASE
Controls whether the LIKE operator is case sensitive.
LIKEESCAPE
An escape character for the LIKE operator.
LOWCASE
Converts all alphabetic characters in a text expression into lowercase.
LPAD
Returns an expression, left-padded to a specified length with the specified characters; or, when the expression to be padded is longer than the length specified after padding, only that portion of the expression that fits into the specified length.
LTRIM
Removes characters from the left of a text expression, with all the leftmost characters that appear in another text expression removed.
MAXCHARS
The number of characters in the longest line of a multiline text expression. The result returned by MAXCHARS has the same dimensions as the specified expression.
NULLIF
Compares one expression with another and returns NA when the expressions are equal, or the base expression when they are not.
NUMCHARS
The number of characters in a text expression.
OBSCURE
Provides two mechanisms for encrypting a single-line text expression. Depending on the mechanism you use, OBSCURE can also restore the encrypted value to its original form.
REMCHARS
Removes one or more characters from a text expression and returns the value that remains.
REPLCHARS
Replaces one or more characters in a text expression.
RPAD
Returns an expression, right-padded to a specified length with the specified characters; or, when the expression to be padded is longer than the length specified after padding, only that portion of the expression that fits into the specified length.
RTRIM
Removes characters from the right of a text expression, with all the rightmost characters that appear in another text expression removed.
SUBSTR
Returns a portion of string, beginning at a specified character position, and a specified number of characters long.
TEXTFILL
Reformats a text value to fit compactly into lines of a specified width, regardless of its current format.
TRIM
Removes leading or trailing characters (or both) from a character string.
UPCASE
Converts all alphabetic characters in a text expression into uppercase.