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: Question on the date after '31-DEC-9999' in Oracle

Re: Question on the date after '31-DEC-9999' in Oracle

From: Holger Baer <holger.baer_at_science-computing.de>
Date: Wed, 25 May 2005 10:07:08 +0200
Message-ID: <d71bnd$rpo$1@news.BelWue.DE>


Mike wrote:
> I tried
> select enddate
> from pc_mike
> where trunc(enddate) > trunc(to_date('31-DEC-9999','D­D-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:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

End of story.

Holger Received on Wed May 25 2005 - 03:07:08 CDT

Original text of this message

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