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-01839: date not valid for month specified

Re: ORA-01839: date not valid for month specified

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Mon, 15 Mar 1999 19:55:04 -0800
Message-ID: <36EDD569.27EA@oriolecorp.com>

Since you are applying the to_date() function to your test_dt column, I presume it is not defined as DATE but as VARCHAR2() or CHAR()? Which means that no validity check was performed by Oracle on insert. Quite obviously, your column contains some wrong data, something like a 30th February or 31st June - just what the message says. By the way, since, once again, you do not specify any date format in to_date(), I understand that the date is supposed to follow your default date format. In that case, do not apply a to_date() function on both sides of the equality, just express the constant as a string in the 'good' (i.e. default) date format. What you have written would prevent Oracle from using the index if the column is indexed.

Regards,

  Stéphane Faroult
  Oriole Corporation



 http://www.oriolecorp.com, the site created by Oracle DBAs for Oracle DBAs
Received on Mon Mar 15 1999 - 21:55:04 CST

Original text of this message

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