7 Replies Latest reply on Feb 14, 2011 10:40 PM by S.Q. R

    How to handle specific table name "ELEMENT"

    S.Q. R Newbie



      I have a table in VDB named "Element".

      I found that in the SQL statement the table name Element should be wrapped by double quotation character like below: 



      But the "Element" table in this VDB (VDB1) is based on underlying another "Element" table in another VDB (VDB2).

      In this case, the table name Element in the SQL against underlying "Element" table of VDB2 is not wrapped by double quotation characters.

      BTW: I use 'multi-sources' feature on VDB1. And VDB2 is one of the data source of VDB1.

      For example, the below SQL on VDB1:


      Then the SQL on VDB2 become below, no double quotation here. The SQL is created by Teiid.

      SELECT g_0.ELE_ID, 'dfs' FROM ELEMENT AS g_0

      So the error log below:

      2011-01-27 11:38:01,898 WARN  [org.teiid.PROCESSOR] (Worker16_QueryProcessorQueue165) 
      Processing exception 'Error Code:0 Message:Error Code:0 Message:'Parsing error: 
      Encountered "ELEMENT" at line 1, column 31.
      Was expecting one of:
          "{" ...
          "xmltable" ...
          <ID> ...
          "table" ...
          "(" ...
          ' error executing statement(s): 
      [Prepared Values: [] SQL: SELECT g_0.ELE_ID, 'dfs' FROM ELEMENT AS g_0]' 
      for request XtzEhfxxDArG.0.  
      Exception type org.teiid.core.TeiidProcessingException thrown 
      from org.teiid.query.parser.QueryParser.convertParserException(QueryParser.java:164). 
      Enable more detailed logging to see the entire stacktrace.


      How can I handle this case?

      It is a little urgent. Any tips are welcome.

      Thank you!