ExistValue

Teradata Vantageā„¢ JSON Data Type

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K

Purpose

The ExistValue method determines if a name represented by a JSONPath-formatted string exists in a JSON instance.

Syntax



JSON_expr
An expression that evaluates to a JSON data type.
JSONPath_expr
A name in JSONPath syntax.
The name can be either UNICODE or LATIN, depending on the character set of the JSON type that invoked this method. If the parameter character set does not match the character set of the JSON type, Teradata attempts to translate the parameter character set to the correct character set.
JSONPath_expr cannot be NULL. If the expression is NULL an error is reported.

Functional Description

ExistValue determines if the name specified by JSONPath_expr exists in the JSON instance specified by JSON_expr.

Return Value

  • 1, if the specified name is found at least once in the JSON instance.
  • 0, if the name is not found.
  • NULL, if the JSON_expr argument is null.