Query from multiple tables...

From: "Diehl, Jeffrey" <jdiehl(at)sandia(dot)gov>
To: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Cc: "Diehl, Jeffrey" <jdiehl(at)sandia(dot)gov>
Subject: Query from multiple tables...
Date: 2001-01-16 20:46:57
Message-ID: B51F0C636E578A4E832D3958690CD73E0130BD9B@es04snlnt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Hi all,

I have a database, that because of the size of the data, I have separated on
day's worth of data into it's own table. I have a separate table for each
of, say, 30 days. I would like to write a query that will query the last 15
days worth of tables. Can this be done?

I tried to use a view; that didn't work. I tried to use the union clause;
that didn't allow me to do group by...

Is there a better way than to have my program rewrite the sql on the fly?

Thanx, in advance,
Mike Diehl,
Network Monitoring Tool Devl.
284-3137
jdiehl(at)sandia(dot)gov

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-01-16 21:21:31 Re: Re: INIT DB FAILURE
Previous Message Diehl, Jeffrey 2001-01-16 20:42:45 Help with query. (*)

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-01-16 21:18:42 Re: Three questions regarding PL/PGSQL
Previous Message Diehl, Jeffrey 2001-01-16 20:42:45 Help with query. (*)