Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01843: not a valid month
Shailesh wrote:
> On startup our Application always sets date format to dd.mm.yyyy format
> using
> ALTER SESSION SET NLS_DATE_FORMAT = 'DD.MM.YYYY';
>
> But error occurs on following statement.
> SELECT Type, Module FROM TableTypeModule
> WHERE NVL(TRUNC(BeginDate), '01.01.1800') <= TRUNC(SYSDATE)
> AND TRUNC(EndDate) >= TRUNC(SYSDATE);
BeginDate, I presume is of the DATE data type. '01.01.1800' is a string ... not a date. Try TO_DATE().
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Thu Dec 15 2005 - 15:03:50 CST