Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 246501337990 for ; Tue, 10 May 2011 17:51:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 12719-09 for ; Tue, 10 May 2011 20:51:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm27-vm4.bullet.mail.ne1.yahoo.com (nm27-vm4.bullet.mail.ne1.yahoo.com [98.138.91.187]) by mail.postgresql.org (Postfix) with SMTP id C3A851337B4E for ; Tue, 10 May 2011 17:51:18 -0300 (ADT) Received: from [98.138.90.50] by nm27.bullet.mail.ne1.yahoo.com with NNFMP; 10 May 2011 20:51:18 -0000 Received: from [98.138.89.175] by tm3.bullet.mail.ne1.yahoo.com with NNFMP; 10 May 2011 20:51:18 -0000 Received: from [127.0.0.1] by omp1031.mail.ne1.yahoo.com with NNFMP; 10 May 2011 20:51:18 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 37874.26571.bm@omp1031.mail.ne1.yahoo.com Received: (qmail 40598 invoked by uid 60001); 10 May 2011 20:51:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1305060677; bh=XEbKWu51YYYQjmWQcBSHOqai+NSPOus18G9mKSL+dhU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=otW4fVBXmDZVoJpMmm2NRxHpe7YhZERQ+lBk+HQJABbI6hBguQ1axcH+KMtMgJEAu3jNZdMXLXIDuPceBZ3NwajFIWFpu5DddSOklsOaBrRGE/iVUcThGX1kaChVp+coqiQN+Ri60XQQM63TXtegWT7OM0N+0UQX00oeAQA8lgw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=HRFmb6LvjiVKAYfgieVqHYbVZfxohGeG+yx5+GWcBPH95biextNIBacWUs55OTuQX775yxN39at371bhVQf8Rv7yW8H3UI3lYjF8Rl8xOJGHZd3Oxt1LvQF2D2RwEjdvyOoqD6wAzlmde9hILKhENNPLYoWPyeJpi/y4a6fHNes=; Message-ID: <177881.34459.qm@web111514.mail.gq1.yahoo.com> X-YMail-OSG: ak2tfRsVM1lFhBxI6d.l1UQnYRZ0xAfA4LOKYivEbDJK38y TW1dMPrOFwMu4sR_LkTtmsRMmzv_.LIrNjnmLKVwchdAibh5Voqfux0X7Kl9 hDgdDhrrNabqUrmPH._UbWNe_bTq5rLoZGLxpSpDJOsIf_w69kpKUtaQJx66 cAdraCiY00ap.0JrwdXIF6CfQSH1JCjEJBC4uKzOgmCFGkR7.wF83pskcxSk vHhyeETNpdcpXvrqH62.83z9JiO_JXwLCHrNIuSVdhaBZbBP21HygHaA3A7n AEnSNXnclbtptJVudaoOqnLcUAdpRBdnGLT3PsIyQpj4VtjVFumLfaggPRmB a7WnzJcmz1IxiQP9Pi7Jfbl46cFNhzbf611PKXUCujS3ZYqX.EoCBHYw- Received: from [72.13.227.132] by web111514.mail.gq1.yahoo.com via HTTP; Tue, 10 May 2011 13:51:17 PDT X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.111.303096 Date: Tue, 10 May 2011 13:51:17 -0700 (PDT) From: Theodore Petrosky Subject: Re: Dates and NULL's` To: John Fabiani , Brent Dombrowski Cc: pgsql-sql@postgresql.org In-Reply-To: <7E925851-8A86-4922-87D4-88F37F86C101@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.992 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/74 X-Sequence-Number: 35358 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 wrote: > From: Brent Dombrowski > Subject: Re: [SQL] Dates and NULL's` > To: "John Fabiani" > Cc: pgsql-sql@postgresql.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@postgresql.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@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql >