Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-01843: not a valid month

397632Aug 27 2010 — edited Aug 30 2010
Hi,

I'm having this problem when I try to insert a value into a table in a Store Procedure.

Here is the code of the Store Procedure:

BEGIN
DBMS_OUTPUT.PUT_LINE('INSERT FUNCTION...');

SELECT TGNSGVOW.SOLICITUDES_VAC_SEQ.NEXTVAL INTO N_ID FROM DUAL;

INSERT INTO SGVOW.SOLICITUDES_VAC
(ID_SOLICITUD,LEGAJO,FECHA_DESDE,FECHA_HASTA,ALTA_USU,ALTA_FECHA,ESTADO_SOLIC,ID_RANGOS)
VALUES
(N_ID, N_LEGAJO, to_date(D_FECHA_DESDE,'DD/MM/YYYY'), to_date(D_FECHA_HASTA,'DD/MM/YYYY'), upper(S_ALTA_USU), to_char(SYSDATE,'DD/MM/YYYY'), 'P',N_IDRANGOS);

EXCEPTION
WHEN others THEN
raise_application_error(-20001, 'SOLICITUDES_VAC ERROR' || sqlcode || ' Error' || sqlerrm);

END;

I'm executing the Store Procedure from .NET with this code but the error ins in the ALTA_FECHA field. Is a DATE type but i don't know why the error appears.

I'm using Oracle 9.2.0.8

Any idea?

Thanks

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 27 2010
Added on Aug 27 2010
9 comments
11,235 views