2 Replies Latest reply on May 31, 2013 1:01 PM by blaxell

    Cannot extract time from Oracle

    blaxell

      Hi,

       

      According to the Oracle's docs:

       

      "The DATE datatype stores point-in-time values (dates and times) in a table. The DATE datatype stores the year (including the century), the month, the day, the hours, the minutes, and the seconds (after midnight)."

       

      I expect to be able to extract the time parts from a date field, but when I am trying to extract the hour from an oracle's date field like:

       

       

      SELECT EXTRACT(HOUR FROM a.modifieddate) FROM oracle_db.salestaxrate a WHERE a.salestaxrateid = 1

       

       

      and get a TEIID30504 exception.  When I look deeper in Teiid's log, i see the following Oracle's exception:

       

      Caused by: java.sql.SQLException: Remote java.sql.SQLException: ORA-30076: invalid extract field for extract source

       

       

      I am using Oracle 10g and Teiid 8.1