Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: "ORA-01843: not a valid month"
insert into V1 values (to_date('05/06/00', 'MM/DD/YY'), ...)", or hmmm, could the format be 'DD/MM/YY', or ?
Eliminate the confusion for Oracle and yourself (better code readability). When inserting a date using a string literal, always do a to_date wrapper.
hth,
cindy
Jerome Poirier wrote:
> 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