Skip site navigation (1) Skip section navigation (2)

Re: Excluding null values

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Sharon Cowling <sharon(dot)cowling(at)sslnz(dot)com>,"Pgsql-Novice (E-mail)" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Excluding null values
Date: 2002-03-13 23:22:54
Message-ID: web-827379@davinci.ethosmedia.com (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-novice by date

Next:From: Jules AlbertsDate: 2002-03-14 15:38:14
Subject: simple previous / next form in PHP
Previous:From: thiemoDate: 2002-03-13 23:14:37
Subject: Nested groups

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group