ORA-01830: date format picture ends before converting entire input string Oracle PL/SQL error message: ORA-01830: date format picture ends before converting entire input string. Cause: A valid date format picture included extra data. The first part of the format picture was converted into a valid date, but the remaining data was not required. Solution: Check…(Continue Reading)
Category: PL/SQL
Learn PLSQL Tutorial
ORA-01821: date format not recognized
ORA-01821: date format not recognized Oracle PL/SQL error message: ORA-01821: date format not recognized. Cause: A date specification contained an invalid format code. Solution: Check that only valid date format codes are specified. Example: SELECT TO_CHAR(sysdate,’YYYY/MM/DD H:MI:SS’) FROM dual; Output: ORA-01821: date format not recognized Correct: SELECT TO_CHAR(sysdate,’YYYY/MM/DD HH24:MI:SS’) FROM dual; Output: 2015/12/26 09:56:04
ORA-01812: year may only be specified once
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)
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)