Results 1 to 3 of 3

Thread: Outer Join

  1. #1
    Join Date
    Jun 2002
    Location
    Houston, TX
    Posts
    116

    Unanswered: Outer Join

    Forgive me if this is dumb!

    If there a way to get a join to give the results two tables without a commonality.

    For example - I have a tables with data for each month. If I bring into a query two tables and want to get all the data with all store numbers. So a store might only be in one table not both.

    My boss thought this would be an outer join. I said no. That is not possible because the tables need to be linked and then you will only get an outer join of one table. Have I missed something?

    I hope this makes sense to someone and can give me an explanation.

    Thanks . . .
    texasalynn

  2. #2
    Join Date
    Oct 2002
    Location
    Sao Paulo - Brazil
    Posts
    16
    hi texasalynn,

    Try a selection union query...

    I think thats possible in your case.
    Regards,

    Rogerio

  3. #3
    Join Date
    Oct 2001
    Location
    Chicago
    Posts
    440
    You want a union query. See the help files.

    This example will combine the data from Table1 and Table2.

    SELECT Month, Sum([Value]) AS SumOfValue
    FROM
    (SELECT Table1.Month, Table1.Value
    FROM [Table1]
    UNION
    SELECT Table2.Month, Table2.Value
    FROM [Table2])
    GROUP BY Month;

    Table1
    Month,Value
    Jan,2
    Feb,6
    April,45
    May,2

    Table1
    Month,Value
    Jan,12
    Feb,4
    March,23

    Results:
    Month,SumOfValue
    Jan,14
    Feb,10
    March,23
    April,45
    May,2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •