ORA-01812: year may only be specified once Oracle PL/SQL error message: ORA-01812: year may only be specified once. Cause: More than one year format code was listed in a date specification. Only one of the following year format codes may be specified in a date: YYYY, YYY, YY, Y. Solution: Remove all but one year…(Continue Reading)
Author: Dev
ORA-01810: format code appears twice
ORA-01810: format code appears twice Oracle PL/SQL error message: ORA-01810: format code appears twice. Cause: A format code was listed twice in a date specification. Each format code may be specified only once in the function TO_DATE. Solution: Remove the duplicate format code from the date specification, then retry the operation. Example: SELECT TO_DATE(‘2015.12.28′,’YY YY/MM/DD’)…(Continue Reading)
ORA-01861: literal does not match format string
ORA-01861: literal does not match format string Oracle PL/SQL error message: ORA-01861: literal does not match format string. Cause: Literals in the input must be the same length as literals in the format string (with the exception of leading white space). If the “FX” modifier has been toggled on, the literal must match exactly, with…(Continue Reading)
ORA-01843: not a valid month
ORA-01843: not a valid month Oracle PL/SQL error message: ORA-01843: not a valid month. Cause: A date specified an invalid month. Valid months are: January-December, for format code MONTH, and Jan-Dec, for format code MON. Solution: Enter a valid month value in the correct format. Example: SELECT TO_DATE(‘2015.26.12′,’YYYY.MM.DD’) FROM dual; Output: ORA-01843: not a valid…(Continue Reading)
ORA-00978: nested group function without GROUP BY
ORA-00978: nested group function without GROUP BY Oracle PL/SQL error message: ORA-00978: nested group function without GROUP BY. Cause: A group function, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, was used within another group function, as in MAX(COUNT(*)), without a corresponding GROUP BY clause. Solution: Either add a GROUP BY clause or…(Continue Reading)