Re: ORA-01861: literal does not match format string
From: Carlos <miotromailcarlos_at_netscape.net>
Date: Tue, 10 Feb 2009 23:54:25 -0800 (PST)
Message-ID: <88dc67f2-84aa-457d-ba33-68276a70013c_at_v38g2000yqb.googlegroups.com>
On 11 feb, 00:16, Palooka <nob..._at_nowhere.com> wrote:
> Noons wrote:
> > shweta.kapar..._at_googlemail.com wrote,on my timestamp of 11/02/2009 1:05 AM:
>
> >> SQL> select * from T1 where last_update=to_date('2008-02-10
> >> 05:59:17','yyyy-mm-dd hh24:mi:ss');
>
> >> NAME TYPE VALUE
> >> ------------------------------------ -----------
> >> ------------------------------
> >> nls_calendar string
> >> nls_comp string
> >> nls_currency string
> >> nls_date_format string dd-mon-rrrr
> >> nls_date_language string
> >> nls_dual_currency string
> >> nls_iso_currency string
> >> nls_language string american
> >> nls_length_semantics string byte
> >> nls_nchar_conv_excp string FALSE
> >> nls_numeric_characters string ,.
> >> nls_sort string
> >> nls_territory string america
> >> nls_time_format string
> >> nls_time_tz_format string
> >> nls_timestamp_format string
> >> nls_timestamp_tz_format string
>
> >> SQL>
>
> >> We cannt chnage the java code immediately to use to_date.
> >> so how to avoid such error:?
>
> > Set your nls_date_format parameter to match what you are using in java:
>
> > alter system set nls_date_format=
> > 'yyyy-mm-dd hh24:mi:ss' scope=both;
>
> > Be aware that this changes the default date format for ALL sessions and
> > users in future.
> > If you only want it for the java session(s), then you must find a way to
> > add a
> > alter session for the same parameter to set the format for only those.
>
> Or write the application properly, as Sybrand recommends. Not arguing
> with you Noons, since you are of course perfectly correct. One just gets
> sick of this shoddy crappy application code.
>
> Palooka
Date: Tue, 10 Feb 2009 23:54:25 -0800 (PST)
Message-ID: <88dc67f2-84aa-457d-ba33-68276a70013c_at_v38g2000yqb.googlegroups.com>
On 11 feb, 00:16, Palooka <nob..._at_nowhere.com> wrote:
> Noons wrote:
> > shweta.kapar..._at_googlemail.com wrote,on my timestamp of 11/02/2009 1:05 AM:
>
> >> SQL> select * from T1 where last_update=to_date('2008-02-10
> >> 05:59:17','yyyy-mm-dd hh24:mi:ss');
>
> >> NAME TYPE VALUE
> >> ------------------------------------ -----------
> >> ------------------------------
> >> nls_calendar string
> >> nls_comp string
> >> nls_currency string
> >> nls_date_format string dd-mon-rrrr
> >> nls_date_language string
> >> nls_dual_currency string
> >> nls_iso_currency string
> >> nls_language string american
> >> nls_length_semantics string byte
> >> nls_nchar_conv_excp string FALSE
> >> nls_numeric_characters string ,.
> >> nls_sort string
> >> nls_territory string america
> >> nls_time_format string
> >> nls_time_tz_format string
> >> nls_timestamp_format string
> >> nls_timestamp_tz_format string
>
> >> SQL>
>
> >> We cannt chnage the java code immediately to use to_date.
> >> so how to avoid such error:?
>
> > Set your nls_date_format parameter to match what you are using in java:
>
> > alter system set nls_date_format=
> > 'yyyy-mm-dd hh24:mi:ss' scope=both;
>
> > Be aware that this changes the default date format for ALL sessions and
> > users in future.
> > If you only want it for the java session(s), then you must find a way to
> > add a
> > alter session for the same parameter to set the format for only those.
>
> Or write the application properly, as Sybrand recommends. Not arguing
> with you Noons, since you are of course perfectly correct. One just gets
> sick of this shoddy crappy application code.
>
> Palooka
Let's see:
One question:
>>"We cannt chnage the java code immediately to use to_date.
so how to avoid such error:? "
Three answers with different solutions, one of them 'a-la-Sybrand' ;-)
One answer completely useless with a flame, some 'bad words' and a little bit of flattery.
This is the usenet, I guess...
Cheers.
Carlos. Received on Wed Feb 11 2009 - 01:54:25 CST