|Oracle® OLAP DML Reference
10g Release 1 (10.1)
Part Number B10339-02
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. See "TEXT and NTEXT".
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.
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).
When the value of text-expression is
NA, FINDLINES returns
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.
Example 13-21 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
newlistT 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