Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question on the date after '31-DEC-9999' in Oracle
Mike wrote:
> I tried
> select enddate
> from pc_mike
> where trunc(enddate) > trunc(to_date('31-DEC-9999','DD-MON-YYYY'));
>
> ENDDATE
> ---------
> 01-JAN-00
> 01-JAN-00
> 01-JAN-00
> 01-JAN-00
> 01-JAN-00
> 01-JAN-00
> 01-JAN-00
> 01-JAN-00
>
> The point I am trying to make is.
> How can a number > than '31-DEC-9999' be inserted?
Using OCI external Date datatype:
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96583/cci04typ.htm#1015744
> Why can't I view it?
Because the database has this limit of 31-DEC-9999.
Baseline: If you (you as in someone) screw up your data, don't come complaining.
SQL> select to_date ('31-DEC-9999', 'dd-MON-YYYY')+1 from dual; select to_date ('31-DEC-9999', 'dd-MON-YYYY')+1 from dual
*ERROR at line 1:
End of story.
Holger Received on Wed May 25 2005 - 03:07:08 CDT