pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: looking for empty fields
3+ messages / 2 participants
[nested] [flat]
* looking for empty fields
@ 2003-08-06 14:07 Jodi Kanter <jkanter@virginia.edu>
2003-08-06 14:02 ` Re: looking for empty fields Viorel Dragomir <bc@vio.ro>
0 siblings, 1 reply; 3+ messages in thread
From: Jodi Kanter @ 2003-08-06 14:07 UTC (permalink / raw)
To: pgsql-sql
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 <mailto:jkanter@virginia.edu>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: looking for empty fields
2003-08-06 14:07 looking for empty fields Jodi Kanter <jkanter@virginia.edu>
@ 2003-08-06 14:02 ` Viorel Dragomir <bc@vio.ro>
2003-08-06 14:33 ` Re: looking for empty fields Jodi Kanter <jkanter@virginia.edu>
0 siblings, 1 reply; 3+ messages in thread
From: Viorel Dragomir @ 2003-08-06 14:02 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; pgsql-sql
________________________________
----- 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
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
<!--[if !supportEmptyParas]--> <!--[endif]-->
<!--[if !supportEmptyParas]--> <!--[endif]-->
<!--[if !supportEmptyParas]--> <!--[endif]-->
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: looking for empty fields
2003-08-06 14:07 looking for empty fields Jodi Kanter <jkanter@virginia.edu>
2003-08-06 14:02 ` Re: looking for empty fields Viorel Dragomir <bc@vio.ro>
@ 2003-08-06 14:33 ` Jodi Kanter <jkanter@virginia.edu>
0 siblings, 0 replies; 3+ messages in thread
From: Jodi Kanter @ 2003-08-06 14:33 UTC (permalink / raw)
To: Viorel Dragomir <bc@vio.ro>; +Cc: pgsql-sql
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 <mailto:jkanter@virginia.edu>
>
> To: Postgres SQL List <mailto:pgsql-sql@postgresql.org>
>
> 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 <mailto: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 <mailto:jkanter@virginia.edu>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-08-06 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-06 14:07 looking for empty fields Jodi Kanter <jkanter@virginia.edu>
2003-08-06 14:02 ` Viorel Dragomir <bc@vio.ro>
2003-08-06 14:33 ` Jodi Kanter <jkanter@virginia.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox