sqloracle-databasedate-formatora-01843

ORACLE 01843. 00000 - "not a valid month"


CREATE TABLE  EventRequest(      
  EVENTNO VARCHAR2(8) constraint EventNoNotNull Not Null,
  DATEHELD DATE constraint DateHelNotNull Not Null,
  DATEREQ DATE CONSTRAINT DateReqNotNull Not Null,
  CUSTNO VARCHAR2(8),
  FACNO VARCHAR2(8),
  DATEAUTH DATE,
  STATUS VARCHAR2(16) CONSTRAINT StatusNotNull Not Null,
  ESTCOST VARCHAR2(30) CONSTRAINT EstCost Not Null,
  ESTAUDIENCE VARCHAR2(8) CONSTRAINT EstAudienceZero CHECK (ESTAUDIENCE>0),
  BUDNO VarCHar2(8),

  CONSTRAINT PK_EventRequest primary Key (EventNo),
  constraint fk_EventCustNo Foreign Key (CustNo) REFERENCES Customer (CustNo),
  constraint fk_EventFacNo foreign key(FacNo) References Facility (FacNo),
  CONSTRAINT checkinstatus CHECK (Status in ('Approved', 'Denied', 'Pending'))
);

This is my table where I'm trying to insert

Insert into EVENTREQUEST(EVENTNO, DATEHELD, DATEREQ, 
                         CUSTNO, FACNO, DATEAUTH,
                         STATUS, ESTCOST, ESTAUDIENCE, BUDNO)
values ('E100', to_date('25-OCT-13','DD-MON-RR'), to_date('06-JUN-13','DD-MON-RR'),
        'C100', 'F100',  to_date('08-JUN-13','DD-MON-RR'),
        'Approved', 5000, 80000, 'B1000');

I'm using Sql Developer and Oracle Developer Day on VirtualBox. I changed my session too with this command but nothing happened

ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-RR HH24:MI:SS';

Solution

  • Resolved with this command: alter session set nls_language=AMERICAN;