Example: UNICODE Combine LATIN - 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 shows how to use the JSON Combine method to combine two JSON objects, one of CHARACTER SET UNICODE and the other of CHARACTER SET LATIN, which results in a JSON instance with text in CHARACTER SET UNICODE. This example also uses the 'OBJECT' parameter to specify a JSON object as the result.
The example uses the table(s) created earlier.
/* Explicit statement of result type as JSON 'OBJECT' */

SELECT edata.Combine(edata2, 'OBJECT') FROM my_table WHERE eno < 3;

Result: When combining LATIN and UNICODE, the result is a JSON instance with text in CHARACTER SET UNICODE.

edata.Combine(edata2)
---------------------
{"name" : "Cameron", "name" : "Lewis"}
{"name" : "Melissa", "name" : "Lewis"}