X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0B5D8D1C48E for ; Wed, 6 Aug 2003 14:26:30 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 38268-01 for ; Wed, 6 Aug 2003 11:25:12 -0300 (ADT) Received: from mailhub.mail.Virginia.EDU (mail.Virginia.EDU [128.143.2.9]) by svr1.postgresql.org (Postfix) with ESMTP id A7D59D1C4CB for ; Wed, 6 Aug 2003 11:26:18 -0300 (ADT) Received: from smtp.mail.Virginia.EDU (smtp.mail.Virginia.EDU [128.143.22.52]) by mailhub.mail.Virginia.EDU (Postfix) with ESMTP id 4704832244; Wed, 6 Aug 2003 10:26:23 -0400 (EDT) Received: from virginia.edu (d-128-19-222.bootp.Virginia.EDU [128.143.19.222]) by smtp.mail.Virginia.EDU (8.11.7/8.11.6) with ESMTP id h76EORl12658; Wed, 6 Aug 2003 10:24:27 -0400 Message-ID: <3F3111D2.20103@virginia.edu> Date: Wed, 06 Aug 2003 10:33:54 -0400 From: Jodi Kanter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Viorel Dragomir Cc: Postgres SQL List Subject: Re: looking for empty fields References: <3F310BA1.2010701@virginia.edu> <161701c35c23$508b8f00$0600a8c0@fix.ro> Content-Type: multipart/alternative; boundary="------------010004030106070504070306" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/51 X-Sequence-Number: 14667 --------------010004030106070504070306 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Viorel Thank you for responding and sorry to waste your time. I just realized my stupid mistake after sending the message! It was an integer field. Jodi Viorel Dragomir wrote: > > > ----- Original Message ----- > > From: Jodi Kanter > > To: Postgres SQL List > > Sent: Wednesday, August 06, 2003 5:07 PM > > Subject: [SQL] looking for empty fields > > > We recently upgraded from version 7.2.3 to 7.3.3 and seem to have > some code that has broken. We were doing checks in various > locations looking for nulls and/or empty fields. To search for > empty fields we said something like > > select count(am_pk) from arraymeasurement where al_fk is null or > al_fk=''; > > > > It's a string value that you're searching for? > > If not, don't use ''. > > > > Is this not allowed anymore? All my check with the double ticks > are failing. I assume there is a difference in postgres between an > empty and null field. How can I check for both in 7.3.3? > Thanks > Jodi > > -- > > _______________________________ > Jodi L Kanter > BioInformatics Database Administrator > University of Virginia > (434) 924-2846 > jkanter@virginia.edu > > > > > > > > > -- _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu --------------010004030106070504070306 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Viorel
Thank you for responding and sorry to waste your time. I just realized my stupid mistake after sending the message! It was an integer field.
Jodi

Viorel Dragomir wrote:
________________________________
 
----- Original Message -----
Sent: Wednesday, August 06, 2003 5:07 PM
Subject: [SQL] looking for empty fields

We recently upgraded from version 7.2.3 to 7.3.3 and seem to have some code that has broken. We were doing checks in various locations looking for nulls and/or empty fields. To search for empty fields we said something like

select count(am_pk) from arraymeasurement where al_fk is null or al_fk='';
 
It's a string value that you're searching for?
If not, don't use ''.


Is this not allowed anymore? All my check with the double ticks are failing. I assume there is a difference in postgres between an empty and null field. How can I check for both in 7.3.3?
Thanks
Jodi
--

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu

<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

<!--[if !supportEmptyParas]-->  <!--[endif]-->

<!--[if !supportEmptyParas]-->  <!--[endif]-->

<!--[if !supportEmptyParas]-->  <!--[endif]-->


--
________________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu


 

 

 


--------------010004030106070504070306--