pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Diehl, Jeffrey <jdiehl@sandia.gov>
To: pgsql-sql@postgresql.org
To: pgsql-general@postgresql.org
Cc: Diehl, Jeffrey <jdiehl@sandia.gov>
Subject: Query from multiple tables...
Date: Tue, 16 Jan 2001 13:46:57 -0700
Message-ID: <B51F0C636E578A4E832D3958690CD73E0130BD9B@es04snlnt> (raw)

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@sandia.gov





view thread (3+ messages)  latest in thread

Message-ID: <B51F0C636E578A4E832D3958690CD73E0130BD9B@es04snlnt>
Permalink:  ../B51F0C636E578A4E832D3958690CD73E0130BD9B@es04snlnt/
Also on:    postgresql.org/message-id/B51F0C636E578A4E832D3958690CD73E0130BD9B@es04snlnt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jdiehl@sandia.gov, pgsql-general@postgresql.org
  Subject: Re: Query from multiple tables...
  In-Reply-To: <B51F0C636E578A4E832D3958690CD73E0130BD9B@es04snlnt>
  References: <B51F0C636E578A4E832D3958690CD73E0130BD9B@es04snlnt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox