0

I want to ask a question about a data virtualization system called teiid, When I create a query like this:

SELECT teiid2602.KC.{**some chinese character**}
FROM teiid2602.KC 
WHERE teiid2602.KC.id is not null;

the teiid system returns the message:

odbc_exec(): SQL error: [unixODBC]ERROR: TEIID30504 KK: 1054 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.`mobile`, g_0.`{**some chinese character**}` FROM `teiid2602`.`KC` AS g_0]
org.teiid.jdbc.TeiidSQLException: TEIID30504 KK: 1054 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.`mobile`, g_0.`{**some chinese character**}` FROM `teiid2602`.`KC` AS g_0];
Error while executing the query, SQL state S0022 in SQLExecDirect

But I can run this query on my MySQL workbench, so I wonder whether Teiid support Chinese character query or not, or is anyone meet the similar problem and know how to fix it.

4

1 回答 1

0

Teiid SQL 解析器将以下字符视为字母:拉丁字母 az 和 AZ,以及 \u0153-\ufffd 的 unicode 范围。无论如何,如果 Teiid 生成包含中文名称的最终输出 SQL 查询,它肯定支持您用于字段名称的特定字母。所以问题可能与 mysql 本身或生成的输出查询有关(在您提供的原始查询中,没有对“移动”字段的引用,而生成的查询包含它)。

无论如何,找出问题所在的最佳方法是从日志中复制生成的查询并尝试直接在 MySQL 上执行它。

于 2014-09-28T20:46:38.913 回答