Re: Calculation of per Capita on-the-fly - problems with SQL syntax

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Stefan Schwarzer <stefan(dot)schwarzer(at)grid(dot)unep(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Calculation of per Capita on-the-fly - problems with SQL syntax
Date: 2007-10-16 13:20:48
Message-ID: 675A11F0-2A19-4A85-A27A-6E5CF1291892@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Oct 16, 2007, at 8:09 , Stefan Schwarzer wrote:

> That is, for one country it can be 1990, for another 1992, for a
> third 1995. As the actual year is not important (and not always
> defined), one tries to use this kind of common describer: various.

When you don't have the year, put them in another table: they're not
the type of data as the rest. If you do, include the year just like
normal and modify the query so it's not joining on the year. If you
need to include both with years and without, write your query
appropriately to include rows from both tables.

Michael Glaesemann
grzm seespotcode net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2007-10-16 13:21:31 improvement proposition
Previous Message Stefan Schwarzer 2007-10-16 13:09:35 Re: Calculation of per Capita on-the-fly - problems with SQL syntax