15.10 - Example: ExistValue Does Not Find the Specified Child - Teradata Database

Teradata Database Teradata JSON

Product
Teradata Database
Release Number
15.10
Published
December 2015
Language
English (United States)
Last Update
2018-06-05
dita:mapPath
TeradataJSON_15_10.ditamap
dita:ditavalPath
ft:empty

The following query results in 'True' if the JSON column contains a child named 'schools' which is an array, and the second element of the array has a child named 'location'.

SELECT eno, 'True'
FROM my_table
WHERE edata.ExistValue('$.schools[1].location') = 1;

Result:

*** No rows found ***

The JSON column contains a child named 'schools' which is an array, and the second element of the array does not have a child named 'location'; therefore, the method did not return any rows.