Correct Query Generates ORA-1841 or ORA-1842 or ORA-1840 or ORA-1843 or ORA-1844 (Doc ID 422068.1)

Last updated on DECEMBER 05, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 8.1.7.4 to 10.2.0.4 [Release 8.1.7 to 10.2]
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.

Symptoms

Select statement generates either ORA-1841, ORA-1842, ORA-1840, ORA-1843 or ORA-1844.

$ oerr ora 1840
01840, 00000, "input value not long enough for date format"
// *Cause:
// *Action:

$ oerr ora 1841
01841, 00000, "(full) year must be between -4713 and +9999, and not be 0"
// *Cause: Illegal year entered
// *Action: Input year in the specified range

$ oerr ora 1843
01843, 00000, "not a valid month"
// *Cause:
// *Action:

$ oerr ora 1842
01842, 00000, "quarter must be between 1 and 4"
// *Cause:
// *Action:

$ oerr ora 1844
01844, 00000, "week of year must be between 1 and 52"
// *Cause:
// *Action:


If CBO chooses another path no error is generated.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms