Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does "0" exist for DATE?
You have two options (that come to mind with a lack of caffeine
induction):
one -> NVL(TO_CHAR(field, dateformat), "Still Single") //Note: that
the field will have to be a varchar2 data conversion
// & does the field REALLY require a date variable???
two -> NVL(marriageDate, zero'dMarriageDate) "Marriage Date" //Note:reference p 3-50 lower half of Oracle7 Server SQL Reference release7.3.
If this works and cause's you to regain lost sanity, beer tastes good. dean pokotylo chef_at_kaos.storm.ca or dean_at_kits.org
Casey Claiborne wrote:
> Hello,
>
> Is there a way to initialize DATE with a default? For example, an
> INTEGER type can be set to 0, so can a FLOAT.
>
> For example, suppose I have a field for a Customer called
> DateOfMarriage. If the customer is not married, this field does not
> apply. What can I set it to in the database? If I use NULL, then
> I will have to worry about ISNULL or ISNOTNULL situations.
>
> Any help on this issue would be *greatly* appreciated :)
>
> TIA
>
> Casey
--
"Never argue with a fool, people might not know the difference." Rare Wisdom
"Two wrongs do not make a right, but three lefts do." Uncommon Logic
![]() |
![]() |