Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Does "0" exist for DATE?

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@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 - 08:24:33 CST

Original text of this message

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