8 Replies Latest reply on Nov 23, 2017 5:36 PM by rp0428

    Why Flashback query returns a record out of range of date

    3591835

      I would like to use oracle flashback data archive (vers. ORACLE 12C) to save every day the modified records of a table.

       

      My flashback query is:

       

      SELECT TB_MOVIMENTO.*,

      VERSIONS_STARTTIME DATE_OPERATION,

      VERSIONS_OPERATION OPERATION,

      dbms_flashback_archive.get_sys_context(versions_xid, 'USERENV','SESSION_USER') AS session_user,

          dbms_flashback_archive.get_sys_context(versions_xid, 'USERENV','MODULE') AS program,

          dbms_flashback_archive.get_sys_context(versions_xid, 'USERENV','HOST') AS host,  

          dbms_flashback_archive.get_sys_context(versions_xid, 'USERENV','OS_USER') AS OS_USER

          FROM TB_MOVIMENTO   

        VERSIONS BETWEEN

        TIMESTAMP TO_TIMESTAMP('2017-11-21 14:00:00', 'YYYY-MM-DD HH24:MI:SS')

            AND TO_TIMESTAMP('2017-11-22 14:00:00', 'YYYY-MM-DD HH24:MI:SS')

               WHERE VERSIONS_STARTTIME IS NOT NULL;

       

      I haven't made changes on the table in the my range of date...

       

      But the query returns two records out of the range of date search:

       

      Can anyone tell me why?