On Wed, October 18, 2006 13:21, spacemarc said:
> ok, instead I use
> (SELECT * FROM tab1 WHERE mydate between 'the-date1' and 'the-date2' )
> UNION
> (SELECT * FROM tab2 WHERE mydate between 'the-date1' and 'the-date2' )
> etc....
>
> But if I wanted to use a join I can make it however or not?
>
>
>
> --
> http://www.spacemarc.it
>
A JOIN implies that the tables are related, that is, a column (or columns)
in table a has the same value as a column (or columns) in table b. Thats
what they mean when they call it a RELATIONAL database. If the tables
don't have such a relationship you are asking for the UNION of the
separate information from table a, where it meets its WHERE conditions,
and the information from table b where it meets its WHERE conditions. The
fact that both where conditions are the same doesn't matter. Hope this
helps.
-------
William R. Mussatto, Senior Systems Engineer
http://www.csz.com
Ph. 909-920-9154 ext. 27
FAX. 909-608-7061