15.10 - Example: Error: JSON Entity Reference With Multiple Results - Teradata Database

Teradata Database Teradata JSON

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1150-151K

This example shows a JSON entity reference where multiple results are found and the warning and error message string that are returned.

Example

SELECT id, jsonCol.numbers
FROM test.jsonTable
WHERE id < 3
ORDER BY id;
Result:
*** Query completed. 2 rows found. 2 columns returned.  
*** Warning: 7548 More than one result per JSON instance found. 
*** Total elapsed time was 1 second.

id     jsonCol.numbers
------------------------
1      *** ERROR MULTI RESULT ***
2      ?                /* There are no numbers in this JSON */