Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: "ORA-01843: not a valid month"

Re: "ORA-01843: not a valid month"

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/06/05
Message-ID: <960233085.7633.6.pluto.d4ee154e@news.demon.nl>#1/1

If it works great with sqlplus, you have a login.sql with the following statement
alter session set nls_date_format = 'DD-MM-RR' (hopefully RR instead of YY). The default date format of Oracle is DD-MON-YY and login.sql is executed in sqlplus only
You are strongly advised *NEVER EVER* to rely on a default date format, DBAs will just *love* you when you do.
So please be a nice guy and use that to_date function in your insert *ALWAYS* The other solution is to create a logon trigger for your user changing nls_date_format.

Regards,

Sybrand Bakker, Oracle DBA
Jerome Poirier <jerome.poirier_at_lip6.fr> schreef in berichtnieuws CjS_4.1354$qY.2729009_at_nnrp4.proxad.net...
> Hello,
>
> Trying to use JDBC to access a database Oracle 8i, I have somme trouble
 with
> dates. The following SQL statement works great with SQL+, but an error
> occurs when send with JDBC : "insert into V1 values ('05/06/00', ...)",
> where V1 is a view :
>
> Create or Replace View V1 as
> Select d, ...
> From T1;
>
> Create Table T1 (
> d DATE,
> ...
> );
>
> The error is "ORA-01843: not a valid month".
>
> Do you have an idea ?
>
> Thank you
> Jerome Poirier
> jerome.poirier_at_lip6.fr
>
>
>
>
>
Received on Mon Jun 05 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US