Example

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

The following query:

SELECT * FROM TABLE(CSV(NEW VARIANT_TYPE(dt.c1, dt.c2, dt.c3), ',', '"')
RETURNS (op varchar(64000) character set LATIN)) as t1;

CSV returns a string where column values are separated by commas and columns with string data types are enclosed in quotation marks.

SELECT * FROM TABLE (CSV(NEW VARIANT_TYPE(dt.c1, dt.c2, dt.c3), ',', '')
RETURNS (op varchar(32000) character set UNICODE)) as t1;

CSV returns a string where column values are separated by comma and columns with string data types are not enclosed by any characters.