X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 567E2924AE2 for ; Thu, 22 May 2003 20:43:05 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 04414-06 for ; Thu, 22 May 2003 20:42:34 -0400 (EDT) Received: from lucifer.akyasociados.com.ar (unknown [200.69.203.237]) by developer.postgresql.org (Postfix) with ESMTP id AB62B924C21 for ; Thu, 22 May 2003 18:34:29 -0400 (EDT) Received: from demos.oficina (demos.oficina [192.168.1.199]) (authenticated bits=0) by lucifer.akyasociados.com.ar (8.12.9/8.12.9) with ESMTP id h4MMaiZj015810; Thu, 22 May 2003 19:36:44 -0300 (ART) (envelope-from franco@akyasociados.com.ar) From: Franco Bruno Borghesi Organization: AK y Asociados S.R.L. To: Don Park , pgsql-sql@postgresql.org Subject: Re: numeric fields and null Date: Thu, 22 May 2003 19:40:48 -0300 User-Agent: KMail/1.5.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200305221940.49755.franco@akyasociados.com.ar> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/436 X-Sequence-Number: 13601 the correct way to do it is select id,postaladdressid from users where postaladdressid IS null; I could tell you way, but this explanation (http://techdocs.postgresql.org/guides/BriefGuideToNulls) is so good that I'would waste your time :) On Thursday 22 May 2003 17:17, Don Park wrote: > Im trying to pull out all records in a table where field > 'postaladdressid=null' but I cant figure this out. > > \d users > .... > id | numeric > postaladdressid | numeric > .... > > adhoc=# update users set postaladdressid=null where id=50; > UPDATE 1 > > adhoc=# select id,postaladdressid from users where postaladdressid=null; > id | postaladdressid > ----+----------------- > (0 rows) > > Why did it not select record 50? > > just for your info, this is what record 50 looks like. > adhoc=# select id,postaladdressid from users where id=50; > id | postaladdressid > ----+----------------- > 50 | > (1 row) > > > Don