Re: Excluding null values - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Excluding null values
Date
Msg-id web-827379@davinci.ethosmedia.com
Whole thread Raw
In response to Excluding null values  (Sharon Cowling <sharon.cowling@sslnz.com>)
List pgsql-novice
Ms. Cowling,

> I have a table which stores a list of locations that a person can
>  have.  In my application I need to get this list of locations, but I
>  don't want the list to contain any null values, a  person must have
>  at least 1 location (done in application code) but the rest of them
>  can be null, only when I bring up the list of possible locations for
>  a person I only want the not null ones, is there any way of
>  achieving this in sql, or will I need to do this at the application
>  level?  Normally I would just say where column is not null, but
>  there are 11 columns in this table that can be not null.

Hmmm ... I'm not sure where to start.  Your database design is *not*
 normalized.  Is this a legacy structure you're saddled with, or is it
 possible to re-design it?

-Josh

pgsql-novice by date:

Previous
From: Sharon Cowling
Date:
Subject: Excluding null values
Next
From: thiemo
Date:
Subject: Nested groups