|Oracle® OLAP DML Reference
11g Release 2 (11.2)
Part Number E17122-05
A text expression within whose values you want to locate a certain line or group of lines. FINDLINES searches text-expression for the specified lines. The match must be exact, including a match of uppercase and lowercase characters. Also, when you specify two or more lines, FINDLINES searches for all the specified lines as a single continuous block in text-expression. When all the lines occur in text-expression, but are not in a continuous block, FINDLINES returns 0 (not found).
FINDLINES accepts TEXT values and NTEXT values as arguments. When only one argument is NTEXT, then FINDLINES automatically converts the other argument to NTEXT before performing the function operation.
Note that when the value of text-expression is
NA, FINDLINES returns
A second text expression containing the line(s) for which you are searching. When lines is not found in text-expression, FINDLINES returns 0. When lines occurs more than once, FINDLINES returns the line number of its first occurrence.
Example 7-97 Finding Two Sequential Lines
This example shows how to find the location of the two lines "products" and "services" in a multiline value in a TEXT variable called
newlist variable has the following values.
salespeople products services regions priorities
The characters "
\n" in the lines argument to the following FINDLINES function call indicates a line break to show that "product" and "services" are separate lines.
SHOW FINDLINES(newlist, 'products\nservices')
The result of this statement is