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.

Peter G.
  • 14,786
  • 7
  • 57
  • 75

1 Answers1

0

The Teiid SQL parser treats the following characters as letters: latin letters a-z and A-Z, and also the unicode range of \u0153-\ufffd. Anyway if Teiid generated the final output SQL query which contains the names in chinese, it definitely supports the particular letters you used for the field name. So the problem may be about the mysql itself or about the output query generated (in the original query you provided there's no reference to 'mobile' field while the generated query contains it).

Anyway, the best way to find out what is the problem is to copy the generated query from the log and try to execute it directly on MySQL.

el fuego
  • 821
  • 9
  • 18