Re: Calculation of per Capita on-the-fly - problems with SQL syntax - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Calculation of per Capita on-the-fly - problems with SQL syntax
Date
Msg-id 675A11F0-2A19-4A85-A27A-6E5CF1291892@seespotcode.net
Whole thread Raw
In response to Re: Calculation of per Capita on-the-fly - problems with SQL syntax  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
List 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



pgsql-general by date:

Previous
From: Stefan Schwarzer
Date:
Subject: Re: Calculation of per Capita on-the-fly - problems with SQL syntax
Next
From: hubert depesz lubaczewski
Date:
Subject: improvement proposition