From: Rosser Schwarz <rosser.schwarz@gmail.com>
To: Caleb Simonyi-Gindele <csg@bordervet.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Group by failing on Null values
Date: Mon, 19 Jul 2004 17:29:32 -0500
Message-ID: <37d451f70407191529610a8eba@mail.gmail.com> (raw)
In-Reply-To: <000001c46ddd$491501d0$c201a8c0@borderveygqj37>
References: <000001c46ddd$491501d0$c201a8c0@borderveygqj37>
while you weren't looking, Caleb Simonyi-Gindele <csg@bordervet.ca> wrote:
> How do I get it to produce a row even when dat_staff_code is null?
try something like
SELECT coalesce(dat_staff_code, 0)...GROUP BY dat_staff_code
That will substitute a zero for any NULL value in that column, which
GROUP BY should then pick up.
/rls
--
:wq
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rosser.schwarz@gmail.com, csg@bordervet.ca
Subject: Re: Group by failing on Null values
In-Reply-To: <37d451f70407191529610a8eba@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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