Example: UNICODE Combine UNICODE - Advanced SQL Engine - Teradata Database

JSON Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
uwa1591040057999.ditamap
dita:ditavalPath
uwa1591040057999.ditaval
dita:id
B035-1150
lifecycle
previous
Product Category
Teradata Vantageā„¢
The example shows the result when two JSON objects are combined with both JSON objects having CHARACTER SET UNICODE, which results in a JSON instance with text in CHARACTER SET UNICODE.
The example uses the table(s) created earlier.
/* Result of UNICODE combine UNICODE is UNICODE */

SELECT MA.edata.Combine(MB.edata) 
FROM my_table AS MA, my_table2 AS MB
WHERE MA.eno < 3;

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

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