
11 May
2009
11 May
'09
12:48 p.m.
On 11-05-2009 14:22:20 +0200, Stefan de Konink wrote:
On Mon, 11 May 2009, Mag Gam wrote:
I have 5 tables like named this:
2009.01 2009.02 2009.03 2009.04 2009.05
Each table has a columns like this:
( id integer, ts timestamp, value char(50) );
If I would like to search from 2009.01 to 2009.04 is it possible to build a query like that? I was thinking if there is a clever VIEW I can create that would include all 5 tables as 1 table.
Any thoughts or ideas?
Union?
Stefan means: CREATE VIEW "2009" AS SELECT "id", "ts", "value" FROM "2009_01" UNION SELECT "id", "ts", "value" FROM "2009_02" UNION ... ;