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: Bob Fazio <rfazio_at_home.com.nospam>
Date: 2000/06/05
Message-ID: <sMW_4.234628$Tn4.2116843@news1.rdc2.pa.home.com>#1/1

You really should always use a to_date. It is just lazy coding, to assume what the format of the date should be.

--
Robert Fazio, Oracle DBA
rfazio_at_home.com
remove nospam from reply address
http://24.8.218.197/
"C. Ferguson" <c_ferguson_at_rationalconcepts.com> wrote in message
news:393C0BC2.4039DE39_at_rationalconcepts.com...

> 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

Original text of this message

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