Usage Notes | OEXISTS | Teradata Vantage - Usage Notes - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
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.