Received: from nts1.rtp.epa.gov (nts1.rtp.epa.gov [134.67.208.208]) by hub.org (8.10.1/8.10.1) with ESMTP id e7EHY7w17873 for ; Mon, 14 Aug 2000 13:34:07 -0400 (EDT) Received: from epamail.epa.gov (IDENT:mvs@wolfpack.rtpnc.epa.gov [134.67.139.59]) by nts1.rtp.epa.gov (8.9.3/8.9.3) with ESMTP id NAA00393; Mon, 14 Aug 2000 13:37:08 -0400 (EDT) Message-ID: <39982D57.EA00C0C6@epamail.epa.gov> Date: Mon, 14 Aug 2000 13:33:11 -0400 From: Mark Volpe X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.14-15mdk i586) X-Accept-Language: en MIME-Version: 1.0 To: Web Manager CC: pgsql-sql@postgresql.org Subject: Re: select an entry with a NULL date field References: <3997FC0F.96ACA1A8@inter-resa.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/93 The syntax you're looking for is: SELECT entry_id FROM tbl_date WHERE date_02 IS NULL; Mark 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