Re: Count Columns - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: Count Columns
Date
Msg-id 20050216195822.GA18513@wolff.to
Whole thread Raw
In response to Count Columns  ("Ray Madigan" <ray@madigans.org>)
List pgsql-sql
On Wed, Feb 16, 2005 at 10:09:05 -0800, Ray Madigan <ray@madigans.org> wrote:
> 
> Is there a way to count the number of null or not null columns in a row and
> have an output column that has that count as the value?

One way to do this would be to create a CASE clause for each column that
returns 1 or 0 depending on whether the column is null or not and add
these expressions up.


pgsql-sql by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: [GENERAL] How to view the list of tables?
Next
From: PFC
Date:
Subject: Re: Matching a column against values in code