Skip Headers

Oracle® OLAP DML Reference
10g Release 1 (10.1)

Part Number B10339-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

MAXCHARS

The MAXCHARS function counts 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.

Return Value

INTEGER

Syntax

MAXCHARS(text-expression)

Arguments

text-expression

The text expression whose characters for each line are to be counted.

Notes


multibyte Characters

When you are using a multibyte character set, you can use the MAXBYTES function instead of the MAXCHARS function.


TEXT and NTEXT

MAXCHARS accepts either a TEXT or NTEXT argument. It does not perform an automatic conversion to either data type. It returns the information that is correct for the data type of the specified argument.

Examples

Example 17-2 Finding the Length of the Longest Line Using Characters

You would like to know the length of the longest line in a text variable called mytext. The following example shows the value of the variable and the result returned by MAXCHARS.

The statement

SHOW mytext

produces the following output.

This is a multiline text variable. 
The longest line is this one in the middle.
The third line is short.

The statement

SHOW MAXCHARS(mytext)

produces the following output.

43