Example: Error - Combine Two JSON ARRAYs and State the Result Is a JSON OBJECT - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The example specifies the 'OBJECT' parameter; however, the data being combined are both JSON array instances, so the result must be a JSON ARRAY. This example results in an error because 'OBJECT' was specified.

The example uses the table(s) created earlier.
/*Error case*/
SELECT edata.Combine(edata2, 'OBJECT') FROM my_table WHERE eno=3;

The example results in an error similar to this:

 *** Failure 7548: Invalid options for JSON Combine method.