List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:October 18 2006 8:51pm
Subject:Re: Simple JOIN on three tables
View as plain text  
 >I simply want to select the records from my three tables that are
 >comprised in time interval.

If you want the results in one resultset, apply an appropriate Where 
clause to each year-table query and union the queries, eg

SELECT * FROM a WHERE date BETWEEN '2004-3-1' AND '2004-6-30'
UNION
SELECT * FROM b WHERE date BETWEEN '2005-3-1' AND '2005-6-30'
etc

PB

-----

spacemarc wrote:
> 2006/10/18, Peter Brawley <peter.brawley@stripped>:
>
>> You can join on any row(s) you like. What are you trying to acccomplish?
>
> I simply want to select the records from my three tables that are
> comprised in time interval.
> Now, the first table comprises the records until to 2004 year; the
> second table unitl 2005 and the third table until 2006.
>
> If a user select a date (example) between 2005 and 2006 I want to
> select the data from two tables....
>


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.5/483 - Release Date: 10/18/2006

Thread
Simple JOIN on three tablesspacemarc18 Oct
  • Re: Simple JOIN on three tablesWilliam R. Mussatto18 Oct
  • Re: Simple JOIN on three tablesRolando Edwards18 Oct
    • Re: Simple JOIN on three tablesspacemarc18 Oct
      • Re: Simple JOIN on three tablesPeter Brawley18 Oct
        • Re: Simple JOIN on three tablesspacemarc18 Oct
          • Re: Simple JOIN on three tablesWilliam R. Mussatto18 Oct
            • Re: Simple JOIN on three tablesspacemarc18 Oct
          • Re: Simple JOIN on three tablesPeter Brawley18 Oct
      • Re: Simple JOIN on three tablesWilliam R. Mussatto18 Oct
  • Re: Simple JOIN on three tablesMartijn Tonies19 Oct