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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Date columns

Re: Date columns

From: Martin Drautzburg <drautzburg_at_altavista.net>
Date: 12 Apr 2001 00:36:05 +0200
Message-ID: <87vgobkqsq.fsf@altavista.net>

Steve Bell <swayne.bell_at_sympatico.ca> writes:

> The NVL function doesn't work either - i.e. entering a null in the
> date field then selecting NVL(datefield, '0') - same error.

This is because oracle expects a particular columns to have the same type in all rows returned. '0' is not a date but all not nulls will be dates.

This however does work

  select decode (x, NULL, 0, 1) from x1;

(where x is of type DATE).

Still I think NULL *is* the correct value to express "no date" or "date not set" or the like. Received on Wed Apr 11 2001 - 17:36:05 CDT

Original text of this message

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