ORA-01481: invalid number format model

ORA-01481: invalid number format model Oracle PL/SQL error message: ORA-01481: invalid number format model. Cause: An invalid format parameter was used with the TO_CHAR or TO_NUMBER function. Solution: Correct the syntax, then retry the operation. Example 1: SELECT TO_NUMBER(SYSDATE,’HH24′) FROM DUAL; Output: ORA-01481: invalid number format model Correct: SELECT TO_CHAR(SYSDATE,’HH24′) FROM DUAL; Output: 10 Oracle…(Continue Reading)

ORA-30076: invalid extract field for extract source

ORA-30076: invalid extract field for extract source Oracle PL/SQL error message: ORA-30076: invalid extract field for extract source. Cause: The extract source does not contain the specified extract field. Solution: Specify a valid extract field for the extract source. Example 1: SELECT EXTRACT (HOUR FROM SYSDATE) FROM DUAL; Output: ORA-30076: invalid extract field for extract…(Continue Reading)

ORA-01818: ‘HH24’ precludes use of meridian indicator

ORA-01818: ‘HH24’ precludes use of meridian indicator Oracle PL/SQL error message: ORA-01818: ‘HH24’ precludes use of meridian indicator. Cause: A date specification contained both a 24-hour time format code and a meridian indicator code. If hours are specified using the 24-hour time format (HH24), a meridian indicator, AM or PM, may not be specified. Solution:…(Continue Reading)

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