CONTAINSROW

The CONTAINSROW function returns the Boolean True if the table referenced as the first argument contains at least one row with the indicated values.

Syntax

CONTAINSROW(
    table,
    value
    [, value...]
)

Parameters
  • table: Table in which to find the indicated values.
  • value: Each of the values to search.
Returned value

The CONTAINSROW function returns a Boolean.

Additional Information

The number of values (arguments after the table) must match the number of columns in table. The types of the fields must be equivalent (that is, if a field in the table is of type numeric, the corresponding value in the function must also be).

Examples

Suppose we have a table of geographic locations:

Starting table

We can check the existence of the row formed by elements 2, "Teruel", "Aragón" and "Spain" with the following measure:

Medida = CONTAINSROW(Geography, 2, "Teruel", "Aragón", "Spain")

CONTAINSROW function

If we look for a row that we know does not exist, like:

Medida = CONTAINSROW(Geography; 2, "Teruel", "Galicia", "Spain")

...the result is the opposite:

CONTAINSROW function

 

Category
Information
Submitted by admin on Thu, 07/18/2019 - 18:34