Example: Extract JSON Name/Value Pairs from the JSON Document - Advanced SQL Engine - Teradata Database

Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-10-15
dita:mapPath
yoz1556235523563.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1092
lifecycle
previous
Product Category
Teradata Vantage™

This example selects particular name/value pairs from the JSON document using JSON string syntax. If a row does not have a specific name requested, null is returned.

select QueryID, RowNum, ParamJSON."Data Record" from QryLogParamJSON;

Result:

QueryID              RowNum   ParamJSON.Data Record
------------------   ------   ---------------------
307190733539634351   1        ?
307190733539634351   2        {"x":"10"}