[MonetDB-users] Table Views

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? TIA

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

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 ... ;

Perfect, thankyou!
On Mon, May 11, 2009 at 8:48 AM, Fabian Groffen
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 ... ;
------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
participants (3)
-
Fabian Groffen
-
Mag Gam
-
Stefan de Konink