"java.sql.SQLSyntaxErrorException: ORA-00904: "YYYY": invalid identifier"

Solution Verified - Updated -

Issue

  • Query with formattimestamp throws below error:
12:08:40,258 WARN  [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue50) TEIID30020 Processing exception for request wRh4QDpFDnXL.6 'TEIID30504 SQLogic: 904 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [{ts '2015-04-14 00:00:00.0'}] SQL: SELECT c_0, c_1, c_2, c_3 FROM (SELECT g_0.ASSETID AS c_0, g_0.DESTINATIONID AS c_1, g_0.CURRENTID AS c_2, TO_CHAR(g_0.HDATE, MM/DD/YYYY) AS c_3 FROM "INTRA_SYSADMIN"."ASSETHISTORY" g_0 WHERE upper(g_0.HSTATUS) = 'OUT FOR DELIVERY' AND g_0.HDATE >= ? AND g_0.ASSETID NOT IN (SELECT DISTINCT g_1.ASSETID FROM "INTRA_SYSADMIN"."ASSETHISTORY" g_1 WHERE upper(g_1.HSTATUS) IN ('DELIVERED', 'LOCKER DELIVERED'))) WHERE ROWNUM <= 100]'. Originally TeiidProcessingException 'ORA-00904: "YYYY": invalid identifier

Environment

  • Red Hat JBoss Data Virtualization (DV) 6.0
  • Oracle RDBMS

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content