pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gvim <gvimrc@gmail.com>
To: pgsql sql <pgsql-sql@postgresql.org>
Subject: Find NOT NULLs in a group of 20 columns
Date: Tue, 11 Jan 2011 02:14:12 +0000
Message-ID: <4D2BBCF4.8070905@gmail.com> (raw)

I'm struggling to find anything other than a complex stored proc to do this:

Out of a group of 20 columns return the rows in which:

1. Only 1 of the 20 columns IS NOT NULL
2. More than 1 of the 20 columns IS NOT NULL

Any ideas?

gvim



view thread (2+ messages)  latest in thread

Message-ID: <4D2BBCF4.8070905@gmail.com>
Permalink:  ../4D2BBCF4.8070905@gmail.com/
Also on:    postgresql.org/message-id/4D2BBCF4.8070905@gmail.com

 · 

reply

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: gvimrc@gmail.com
  Subject: Re: Find NOT NULLs in a group of 20 columns
  In-Reply-To: <4D2BBCF4.8070905@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