From bc@vio.ro Wed Aug 6 14:03:40 2003 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 EBF1FD1C7EB for ; Wed, 6 Aug 2003 14:03:40 +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 35640-02 for ; Wed, 6 Aug 2003 11:02:23 -0300 (ADT) Received: from mail1.dr.myx.net (mail1.dr.myx.net [217.10.193.161]) by svr1.postgresql.org (Postfix) with ESMTP id A3D63D1C518 for ; Wed, 6 Aug 2003 11:03:28 -0300 (ADT) Received: from workstation24 (unknown [81.12.137.146]) by mail1.dr.myx.net (mydomain.myx.net) with ESMTP id 252373005E2; Wed, 6 Aug 2003 17:03:27 +0300 (EEST) Message-ID: <161701c35c23$508b8f00$0600a8c0@fix.ro> From: "Viorel Dragomir" To: "Jodi Kanter" , "Postgres SQL List" References: <3F310BA1.2010701@virginia.edu> Subject: Re: looking for empty fields Date: Wed, 6 Aug 2003 17:02:02 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_1614_01C35C3C.74AD3F50" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=ASCII_FORM_ENTRY, BAYES_30, HTML_60_70, REFERENCES X-Spam-Level: X-Archive-Number: 200308/49 X-Sequence-Number: 14665 This is a multi-part message in MIME format. ------=_NextPart_000_1614_01C35C3C.74AD3F50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ________________________________ ----- Original Message -----=20 From: Jodi Kanter=20 To: Postgres SQL List=20 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 co= de that has broken. We were doing checks in various locations looking for n= ulls and/or empty fields. To search for empty fields we said something like= =20 select count(am_pk) from arraymeasurement where al_fk is null or al_fk=3D= ''; 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 faili= ng. I assume there is a difference in postgres between an empty and null fi= eld. How can I check for both in 7.3.3? Thanks Jodi --=20 _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu=20 ------=_NextPart_000_1614_01C35C3C.74AD3F50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ________________________________
 
----- Original Message -----
Fro= m:=20 Jodi= =20 Kanter
Sent: Wednesday, August 06, 2003 5= :07=20 PM
Subject: [SQL] looking for empty= =20 fields

We recently upgraded from version 7.2.3 to 7.3.3 and seem to have so= me=20 code that has broken. We were doing checks in various locations looking f= or=20 nulls and/or empty fields. To search for empty fields we said something l= ike=20

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


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

____________________________= ___
Jodi L Kanter
BioInformatics Database=20 Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu
= <!--[if=20 !supportLineBreakNewLine]--><!--[endif]-->

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

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

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

------=_NextPart_000_1614_01C35C3C.74AD3F50-- From jkanter@virginia.edu Wed Aug 6 13:58:39 2003 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 8AB2ED1C48E for ; Wed, 6 Aug 2003 13:58:39 +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 32260-09 for ; Wed, 6 Aug 2003 10:57:21 -0300 (ADT) Received: from mailhub.mail.Virginia.EDU (mail.Virginia.EDU [128.143.2.9]) by svr1.postgresql.org (Postfix) with ESMTP id 97A1FD1C4C1 for ; Wed, 6 Aug 2003 10:58:28 -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 211B432208 for ; Wed, 6 Aug 2003 09:58:33 -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 h76Dw3l43022 for ; Wed, 6 Aug 2003 09:58:03 -0400 Message-ID: <3F310BA1.2010701@virginia.edu> Date: Wed, 06 Aug 2003 10:07:29 -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: Postgres SQL List Subject: looking for empty fields Content-Type: multipart/alternative; boundary="------------010203070402040603030707" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/48 X-Sequence-Number: 14664 --------------010203070402040603030707 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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=''; 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 --------------010203070402040603030707 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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='';

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


 

 

 

--------------010203070402040603030707-- From jkanter@virginia.edu Wed Aug 6 14:26:30 2003 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--