Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: "ORA-01843: not a valid month"
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