Example: JSONExtract with Several Results - Advanced SQL Engine - Teradata Database

JSON Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
gzn1554761068186.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1150
lifecycle
previous
Product Category
Teradata Vantage™
The example uses the JSONExtract method to extract unfiltered results from a table. This example shows multiple results being returned.
The example uses the table(s) created earlier.
/* JSONExtract with several results - get the name of everyone. */

SELECT eno, edata.JSONExtract('$..firstName') 
FROM my_Table
ORDER BY 1;
Result: The result(s) are arrays of values.
ENO edata.JSONExtract(…)
--------------------------
1  [ "Cameron" ]
2  [ "Melissa" ]
3  [ "Alex" ]
4  [ "David" ]