SQL Developer, INSERT dated: error - ORA-01843: not a valid month

0

I am running this to insert values in the table:

CREATE TABLE SERVICIOS
(
    ID INTEGER PRIMARY KEY NOT NULL,
    FECHA DATE NOT NULL,
    HORA TIMESTAMP NOT NULL,
    DISTANCIA DECIMAL (*,2) NULL,
    TIEMPO_REQUERIDO INTEGER NULL,
    DIRECCION_ORIGEN VARCHAR2(255) NULL,
    DIRECCION_DESTINO VARCHAR2(255) NULL,
    TARIFA DECIMAL (*,2) NULL,
    ESTADO VARCHAR2 (255) NULL,
    TARIFA_DINAMICA VARCHAR2(1) CHECK ((TARIFA_DINAMICA = 'V') OR (TARIFA_DINAMICA = 'F')),
    MEDIO_PAGO_ID INTEGER NOT NULL,
    CONDUCTOR_ID INTEGER NOT NULL,
    VEHICULO_ID INTEGER NOT NULL,
    CLIENTE_ID INTEGER NOT NULL,
    SERVICIO_COMPARTIDO_CLIENTE_ID INTEGER NULL
);

    insert into SERVICIOS (ID, FECHA, HORA, DISTANCIA, TIEMPO_REQUERIDO, DIRECCION_ORIGEN, DIRECCION_DESTINO, TARIFA, ESTADO, TARIFA_DINAMICA, MEDIO_PAGO_ID, CONDUCTOR_ID, VEHICULO_ID, CLIENTE_ID, SERVICIO_COMPARTIDO_CLIENTE_ID)

values (4923, '05/05/2018', '6:15 AM', 3.3, 33, '87445 Dorton Park', '589 Miller Parkway', 83502.13, 'INACTIVO', 33573.67, 15, 25, 29, 30, 90);

But I get this error:

  

Error starting at line: 2 of the command:
  insert into SERVICES (ID, DATE, TIME, DISTANCE, TIME_REQUIRED, ADDRESS_ORIGIN, ADDRESS_DESTINATION, RATE, STATE, DYNAMIC_DATE, MEDIA_PAYMENT_ID, DRIVER_ID, VEHICLE_ID, CUSTOMER_ID, SERVICE_COMPARTIDO_CLIENTE_ID)

values (4923, '05/22/2018', '6:15 AM', 3.3, 33, '87445 Dorton Park', '589 Miller Parkway', 83502.13, 'INACTIVO', 33573.67, 15, 25, 29, 30, 90)

  Error Report - ORA-01843: not a valid month

What am I failing? I have tried several things, and none has worked for me.

    
asked by Basilio Saldarriaga 23.09.2018 в 07:37
source

1 answer

0

First of all, you have to read what the errors say in your case, your error says

"not a valid month"

and seeing how the date is throwing the error I think I give an idea your date format should be dd / mm / yy that translated would be - > day / month / year

then according to the error you are inserting a date that is not valid because according to your insertion 05/22/2018, there is not a month 22. You have to check the values you are inserting well

    
answered by 23.09.2018 / 07:55
source