The CONTAINSROW function returns the Boolean True if the table referenced as the first argument contains at least one row with the indicated values.
CONTAINSROW(
table,
value
[, value...]
)
- table: Table in which to find the indicated values.
- value: Each of the values to search.
The CONTAINSROW function returns a Boolean.
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).
Suppose we have a table of geographic locations:
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")
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: