From: "Alexey E. Neckrasow" <nec@leaves.spb.su>
Subject: Re: SQL Question:  Date Substitution on NULL fields
Date: 1997/08/08
Message-ID: <33EB0CB4.EC86A774@leaves.spb.su>#1/1
References: <5s502a$kmf@camel12.mindspring.com>
To: David Sivick <dsivick@mindspring.com>
X-Priority: 3 (Normal)
Organization: Leaves Inc.
Reply-To: nec@leaves.spb.su
Newsgroups: comp.databases.oracle.server



Hi!

You gotta use
select purchase_no, nvl (date, '00/00/00') from 'table'.
                    ^^^

David Sivick wrote:

>  How can I get the null fields in a column type DATE to be represented
> by
> some other field in a select statement.  I don't want to update the
> fields
> in the table, I just want the field to show up as something else in
> the
> select.
>
> For Example:
>
> Purchase_No    Item             Date
> ------------------------------------------------
> 0145                    Boots
> 0146                    Socks        01/01/97
> 0147                    Tie             11/11/96
>
> So my select would be:
>
> select purchase_no,date from 'table'
>
> And I want to get back...
>
> 0145    00/00/00
> 0146   01/01/97
> 0147  11/11/96
>
> I have tried to fool the replace function, but since I am not dealing
> with a
> character field, it is not being freindly.
>
> Thanks,
> David



--
Regards. Alexey Neckrasow. Leaves Inc. Russia.
e-mail: nec@leaves.spb.su




