dbTalk Databases Forums  

Invalid Date Stored In Oracle - Any Guesses ?

comp.databases.oracle comp.databases.oracle


Discuss Invalid Date Stored In Oracle - Any Guesses ? in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GaudaPrime
 
Posts: n/a

Default Invalid Date Stored In Oracle - Any Guesses ? - 03-06-2005 , 02:43 PM






Hi,

I have an Oracle 8i instance which has somehow managed to store the
29th of February 2005 in a date field. As 2005 isn't a leap year this
is an invalid date.

SQL> select NEXTTRIG_DATE, lst_date from mc.tsklnk
where NEXTTRIG_DATE between '28-FEB-05' and '01-MAR-05'
and lst_date = '29-FEB-04'
order by NEXTTRIG_DATE
/

NEXTTRIG_ LST_DATE
--------- ---------
29-FEB-05 29-FEB-04
29-FEB-05 29-FEB-04
29-FEB-05 29-FEB-04

Selecting to_date(NEXTTRIG,yyyy) produces 0000, which I guess means the
to-date is crashing internally

While I can and have fixed the problem, I'd love to know how one would
be able to do this anyway - seeing as I can't duplicate the problem.
The information was stored by a third party ERP application via Oracle
ODBC, so I can't tell what it did - any suggestions ? So far the
application itself and MS Query have collapsed trying to read the date
(I'm guessing they do their own validation), so it's quite interesting
....

Any ideas ?

Andrew


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.