Home » SQL & PL/SQL » SQL & PL/SQL » DATE ISSUES (ORACLE 9I)
DATE ISSUES [message #330048] Fri, 27 June 2008 07:51 Go to next message
nagaa
Messages: 33
Registered: August 2007
Location: chennai
Member
I am Inserting 11-NOV-1111 as NULL value of DATE datatype of a column in a source table. After inserted the source table contains 11-NOV-11 value for NULL. while selecting the values, is 11-NOV-11, which is in meaing 11-NOV-2011.

I want the NULL value to be invalid date which should not be in 1900 or 2000 centuries.

Pls,help

Re: DATE ISSUES [message #330051 is a reply to message #330048] Fri, 27 June 2008 07:56 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Such a bad design can lead to unexpected results. Using proper TO_DATE function may help your overcome the results you are seeing, but you'd have a hard time finding anyone here who thinks storing a dummy value instead of a null is helpful in any way. Get ready for the responses.
Re: DATE ISSUES [message #330056 is a reply to message #330048] Fri, 27 June 2008 08:18 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
NULL is NULL and should not be any value.
Using value instead of NULL will fool the optimizer.

Regards
Michel
Previous Topic: getting error while opening procedure or package
Next Topic: REGEXP_REPLACE function usage
Goto Forum:
  


Current Time: Sun Dec 04 02:11:26 CST 2016

Total time taken to generate the page: 0.15547 seconds