Re: Group by failing on Null values - Mailing list pgsql-sql

FromRosser Schwarz
SubjectRe: Group by failing on Null values
Date
Msg-id[email protected]
Whole thread Raw
In response toGroup by failing on Null values  (Caleb Simonyi-Gindele <[email protected]>)
Responseslocks and triggers. give me an advice please
Listpgsql-sql
while you weren't looking, Caleb Simonyi-Gindele <[email protected]> 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


pgsql-sql by date:

Previous
From: Caleb Simonyi-Gindele
Date:
Subject: Group by failing on Null values
Next
From: sad
Date:
Subject: locks and triggers. give me an advice please