Usage Notes | OEXISTS | Teradata Vantage - Usage Notes - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
tpf1598412463935.ditamap
dita:ditavalPath
tpf1598412463935.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

OEXISTS takes an array expression as an argument and checks the element specified by the index to see if it contains a value or is in an uninitialized state. OEXISTS returns 1 if the specified element contains a non-NULL or NULL. If the element is in an uninitialized state, the method returns 0.

If the value of index_value or array_bound is out of bounds for array_expr, OEXISTS returns 0. If either index_value or array_bound is NULL, a 0 value is returned. If array_expr is NULL, then an error stating that the function does not exists is returned.

If array_expr refers to an empty array with all elements in an uninitialized state, then OEXISTS returns 0. The OEXISTS method with an integer index_value argument is compatible with the Oracle EXISTS method for one-dimensional ARRAY types.