Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01873 "leading precision of the interval is too small" error

user5716448Aug 1 2017 — edited Aug 15 2017

Hi,

We have some bad data in a table showing year as 0217 rather than 2017

was looking to update by adding 1800 years to it so shows 2017 but getting error ORA-01873 "leading precision of the interval is too small" error

using

date_field, date_field + INTERVAL '1800' YEAR

can do

date_field, date_field + INTERVAL '10' YEAR and no error but if try add say 100 or 1800 get error.

oracle 11.2.0.3 and date datatype

example bad 26/07/0217 18:00:00

How can we add 1800 years to the date using year?

Can use add_months(date_field,21600) as workaround.

Thanks

This post has been answered by mathguy on Aug 1 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2017
Added on Aug 1 2017
5 comments
151 views