Skip Headers
Oracle® OLAP DML Reference
11g Release 1 (11.1)

B28126-03
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
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

INLIST

The INLIST function determines whether every line of a text value is a line in a second text value. Normally, INLIST is used to determine whether all the lines of a list (in the form of a multiline text value) can be found in a master list (in the form of a second multiline text value).

INLIST accepts TEXT values and NTEXT values as arguments. When only one argument is NTEXT, then INLIST automatically converts the other argument to NTEXT before performing the function operation.

Return Value

BOOLEAN

Syntax

INLIST(masterlist list)

Arguments

masterlist

A multiline text expression to which the lines of list are compared.

list

A multiline text expression whose lines are compared with the lines of masterlist. When every line of list can be found as a line of masterlist, INLIST returns the value YES. When one or more lines of list are not found in masterlist, INLIST returns the value NO.

Examples

Example 7-118 Comparing a List to a Master List

This example shows how to use INLIST to determine whether the lines of one list can be found in a master list. The master list in this case is a multiline text value in a variable called depts. The depts variable has the following values.

Marketing
Purchasing
Accounting
Engineering
Personnel

The first function call compares a list, which is specified as a text literal, with the master list. The return value is YES.

INLIST(depts, 'Accounting\nPersonnel')

The second function call compares a variable newlist that has the following values,

Development
Accounting

with the master list in depts. The return value is NO.

INLIST(depts, newlist)