Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux