Re: select an entry with a NULL date field

From: Kate Collins <klcollins(at)wsicorp(dot)com>
To: Web Manager <web(at)inter-resa(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: select an entry with a NULL date field
Date: 2000-08-14 17:02:32
Message-ID: 39982628.D75E03FD@wsicorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Try:

select entry_id from tbl_date where date02 is null;

Kate

Web Manager wrote:

> Hello,
>
> I have a problem with PostgreSQL when I try to select or delete an entry
> with an empty date. That's a typical entry
>
> Table tbl_date
> -----------------------------
> entry_id 154
> date_01 2000-01-15
> date_02 this date is NULL
> name my_test
> -----------------------------
>
> I want to select every entry containing date_02 as NULL
> I tried :
> >select entry_id from tbl_date where date_02=NULL;
> ERROR: parser: parse error at or near "null"
> >select entry_id from tbl_date where date_02='';
> Not work, that's a wrong date format
> >select entry_id from tbl_date where date_02="";
> Not work, "" considered as an attribute
>
> Thank you for your time!
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Marc Andre Paquin

--
=================================================
Katherine (Kate) L. Collins
Senior Software Engineer/Meteorologist
Weather Services International (WSI Corporation)
4 Federal Street
Billerica, MA 01821
EMAIL: klcollins(at)wsicorp(dot)com
PHONE: (978) 670-5110
FAX: (978) 670-5100
http://www.intellicast.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Volpe 2000-08-14 17:33:11 Re: select an entry with a NULL date field
Previous Message Andreas Tille 2000-08-14 16:08:34 Any SQL-functions examples available