Re: Does "0" exist for DATE?

From: Dean Pokotylo <chef_at_kaos.storm.ca>
Date: Fri, 07 Jan 2000 14:24:33 GMT
Message-ID: <3875F73A.F69407BB_at_kaos.storm.ca>


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

--
________________________________________________________________
Dean "Rainman" Pokotylo      email: chef_at_kaos.storm.ca

"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
________________________________________________________________
Received on Fri Jan 07 2000 - 15:24:33 CET

Original text of this message