All Forums Database
ricky_ru 16 posts Joined 11/12
14 Mar 2013
Sql column alias contains non-English Characters

As subject indicates,  is it supported in TD when using jdbc to run sql such as
SELECT NAME AS "Non-English Char Here",  ACCOUNT AS "Non-English Char Here" FROM ACCOUNT
I set the JDBC URL connection parameters as 1) CHARSET=UTF8, 2) CLIENT_CHARSET=UTF8, 3)DEFAULT(ASCII). Only 1) seems support well. The other two do not fully support.
The error message is as below:
Error: [Teradata Database] [TeraJDBC] [Error 3697] [SQLState HY000] Attempt to translate Unicode/Graphic/KanjiSJIS data to another form has failed
SQLState:  HY000
ErrorCode: 3697

In other databases, this is supported well. I am not sure if TD supports this or there is configuration/trick there? or something realted charset....??

Thanks, RR
ricky_ru 16 posts Joined 11/12
14 Mar 2013

From reference, the CHARSET=UTF8 is strongly recommended while CLIENT_CHARSET should not be used....But how to fix the problem I mentioned above...


tomnolan 594 posts Joined 01/08
15 Mar 2013

As you said, CHARSET=UTF8 is recommended. Please use it.

The only reason that CHARSET=UTF8 might not work for your application is for retrieving fixed-width CHAR columns, and your application has difficulty with the trailing spaces that are appended by the Teradata Database when using CHARSET=UTF8. For this situation, CHARSET=UTF16 is the recommended alternative.

The CLIENT_CHARSET connection parameter is only intended for compatibility with legacy applications that erroneously stored non-Latin character data into Latin columns. Please do not use it for any other purpose. Please avoid it.

You must sign in to leave a comment.