On 4/7/06, Tom Lane <[EMAIL PROTECTED]> wrote: > Mario Weilguni <[EMAIL PROTECTED]> writes: > > I think all except the first one should raise a warning, isn't it? > > to_timestamp (and friends) all seem to me to act pretty bizarre when > faced with input that doesn't match the given format string. However, > in the end that is an Oracle-compatibility function, and there is only > one measure of what it should do: what does Oracle do in the same case. > Can anyone try these examples on a recent Oracle version?
In Oracle10g Express those dates are rejected as invalid : SQL> select to_timestamp('00000000 0300','yyyymmdd hh24mi') from dual; select to_timestamp('00000000 0300','yyyymmdd hh24mi') from dual * ERROR at line 1: ORA-01843: not a valid month SQL> select to_timestamp(' 0300','yyyymmdd hh24mi') from dual; select to_timestamp(' 0300','yyyymmdd hh24mi') from dual * ERROR at line 1: ORA-01843: not a valid month Cheers, Adrian Maier ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings