Quick Search:
 
 Oracle Database Error: ORA-01878      [Return To Oracle Error Index] Jump to:  
Oracle Error: ORA-01878

Error Description:
Specified field not found in datetime or interval

Error Cause:
The specified field was not found in the datetime or interval.

Action:
Make sure that the specified field is in the datetime or interval. To avoid this error, consider using an explicit cast of the expression in the WHERE clause to a timestamp type (timestamp without timezone), in this way:

SELECT *
FROM MY_TABLE T
WHERE T.MY_TIMESTAMP >= cast(CURRENT_TIMESTAMP - INTERVAL '1' HOUR As timestamp);

Alternatively you can explicitly set the session time zone to, for example '-05:00' - for New York standard (winter) time, using ALTER SESSION time_zone = '-05:00', or by setting ORA_SDTZ environment variable in all client's environments.


Add a comment 
K MartinApr 5th, 2016 10:06am
Excellent solution description, this solved our problem. Thank you!
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2025 psoug.org