Re: problems with SELECT query results

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Brian Hurt <bhurt(at)janestcapital(dot)com>, Joshua <joshua(at)joshuaneil(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: problems with SELECT query results
Date: 2007-05-29 16:32:47
Message-ID: 997252.72262.qm@web31808.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


--- Brian Hurt <bhurt(at)janestcapital(dot)com> wrote:
> Check for nulls. Remember that 'foo' || NULL yeilds NULL, so if one of
> your fields is null, the whole string will be null.

Also, if you know the nulls will be present, and you want a way to handle them is a predetermined
way, you can wrap your fields like so: COALESCE( yourfield, 'oops value is null') or some such.

http://www.postgresql.org/docs/8.2/interactive/functions-conditional.html#AEN13107

I hope this helps.

Regards,
Richard Broersma Jr.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joshua 2007-05-29 16:43:45 Re: problems with SELECT query results
Previous Message Brian Hurt 2007-05-29 16:20:32 Re: problems with SELECT query results