Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Question: Date Substitution on NULL fields
This is a multi-part message in MIME format.
--------------ADFFBD885D3EFAD6BDE65996 Content-Type: text/plain; charset=us-ascii Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit
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
David,
Did you try the NVL() function?
--------------ADFFBD885D3EFAD6BDE65996 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Christopher Suh Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Christopher Suh n: Suh;Christopher email;internet: cys4_at_columbia.edu title: Oracle Developer
--------------ADFFBD885D3EFAD6BDE65996-- Received on Thu Aug 07 1997 - 00:00:00 CDT
![]() |
![]() |