4 Replies Latest reply: Sep 26, 2013 6:19 AM by Jspalmer-Oracle RSS



      We are trying to execute a statement SELECT CURRENT_DATE FROM DUAL on Timesten 11.2.2  . It throws error unknown referenced column error.


      Command> select current_date from dual;

      2211: Referenced column CURRENT_DATE not found

      The command failed.


      But the following doc shows the support.


      Please help.



      TimesTen PL/SQL Support: Reference Summary


      CURRENT_DATE function

      Returns the current date in the session time zone.


      In TimesTen this returns the current date in UTC (universal time). TimesTen does not support local time zones.

        • 1. Re: CURRENT_DATE
          Steve - Oracle-Oracle

          If you want the date why not use    SELECT SYSDATE FROM DUAL; ?


          Here's a little example on using current_date though :


          Command> create procedure test is

                 > begin

                 > dbms_output.put_line( current_date );

                 > end;

                 > /


          Procedure created.


          Command> set serveroutput on;

          Command>  exec test;

          2013-09-26 10:27:51


          Hope that helps.



          • 2. Re: CURRENT_DATE

            sysdate gives the date in local and not in UTC . we are looking for UTC. What is the best way to get it in a select statement.

            • 3. Re: CURRENT_DATE
              Steve - Oracle-Oracle

              I don't believe that is possible in TimesTen.

              • 4. Re: CURRENT_DATE

                current_date is not available as an SQL function in TimesTen, unlike Oracle. It's available as a PLSQL function, which can be used in this way:


                create or replace procedure test is

                          dt date;

                          mydt varchar2(100);



                           dt := current_date;

                           mydt := to_char(dt, 'HH24');

                           if ((mydt >= 0) and (mydt <= 24)) then




                           end if;




                Procedure created.


                Command> exec test;