Oracle® OLAP DML Reference 11g Release 2 (11.2) Part Number E17122-07 |
|
|
PDF · Mobi · ePub |
The REMCOLS function removes specified columns from every line of a multiline TEXT value. The function returns a multiline text value that includes only the remaining columns.
Columns refer to the character positions in each line of a multiline TEXT value. The first character in each line is in column one, the second is in column two, and so on.
TEXT or NTEXT
REMCOLS always returns a TEXT value that has the same number of lines as text-expression, though some lines may be empty.
REMCOLS(text-expression start [length])
The text expression from which the specified columns should be removed. When text-expression is a multiline TEXT value, the characters in the specified columns are removed from each one of its lines.
When you specify a TEXT expression, the return value is TEXT. When you specify an NTEXT expression, the return value is NTEXT.
An INTEGER
, between 1 and 4,000, representing the column position at which to begin removing columns. The column position of the first character in each line of text-expression is 1
. When you specify a starting column that is to the right of the last character in a given line in text expression, the corresponding line in the return value is identical to the given line.
An INTEGER
representing the number of columns to be removed. When you do not specify length, REMCOLS removes only the starting column. When you specify a length that exceeds the number of characters that follow the starting position in a given line in text expression, the corresponding line in the return value includes only the characters that precede the starting column.
Example 8-74 Removing Text Columns
In the following example, four columns are removed from each line of CITYLIST, starting from the second column.
DEFINE citylist VARIABLE TEXT CITYLIST = 'Boston\nHouston\nChicago\nDenver'
The statement
SHOW citylist
produces the following output.
Boston Houston Chicago Denver
The statement
SHOW REMCOLS(citylist 2 4)
produces the following output.
Bn Hon Cgo Dr