Re: Dates and NULL's`

From: Theodore Petrosky <tedpet5(at)yahoo(dot)com>
To: John Fabiani <johnf(at)jfcomputer(dot)com>, Brent Dombrowski <brent(dot)dombrowski(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Dates and NULL's`
Date: 2011-05-10 20:51:17
Message-ID: 177881.34459.qm@web111514.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

If you think of it more like a null is an unknown. two unknowns can never be the same. they are unknown.

and a known date can never equal an UNknown date. if the unknown date is equal to a date, then it is known!!!!

my head hurts!!

Ted

--- On Tue, 5/10/11, Brent Dombrowski <brent(dot)dombrowski(at)gmail(dot)com> wrote:

> From: Brent Dombrowski <brent(dot)dombrowski(at)gmail(dot)com>
> Subject: Re: [SQL] Dates and NULL's`
> To: "John Fabiani" <johnf(at)jfcomputer(dot)com>
> Cc: pgsql-sql(at)postgresql(dot)org
> Date: Tuesday, May 10, 2011, 4:33 PM
> On May 10, 2011, at 9:48 AM, John
> Fabiani wrote:
>
> > Hi,
> > Maybe this is a dumb question but if I have a date
> field that contains a NULL
> > will it show up when I ask for a where date range for
> the same date field.
> >
> > Where mydate >= "2011/04/01"::date and mydate<=
> "2011/04/30"::date
> >
> > With the above where will the NULL's be selected????
> >
> > I ask because I was always told that a NULL matches
> everything and nothing!
> >
> > Johnf
> >
> > --
> > Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-sql
>
>
> The NULLs will not be included. NULL matches nothing, not
> even itself.
>
> Brent D.
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tony Capobianco 2011-05-11 20:29:40 replace " with nothing
Previous Message Emi Lu 2011-05-10 20:36:45 Re: Dates and NULL's`