User Profile

Collapse

Profile Sidebar

Collapse
tk2393
tk2393
Last Activity: Apr 29 '09, 02:42 PM
Joined: Mar 12 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • tk2393
    replied to outer join with sum
    Solution

    Here's how I ended up doing it. I had to divide it into three different queries: one query for unique values in Table1, one query for unique values in Table2, and one query for the combined values. Then I combined all three with unions.
    Code:
    SELECT * INTO ResultTable
    FROM [
    
    select ID, VALUE from Table1 where Table1.ID not in (select ID from Table2)
    
    union
    
    select Table1.ID,
    ...
    See more | Go to post
    Last edited by NeoPa; Apr 22 '09, 05:46 PM. Reason: Please use the [CODE] tags provided

    Leave a comment:


  • tk2393
    replied to outer join with sum
    Thanks!

    In answer to your question, I did post my response, but apparently it either got lost or rejected. I laid out the solution that I came up and asked for a critique. However, I never saw my response posted, and I likewise never received a critique. Do you have any record of my second post?
    See more | Go to post

    Leave a comment:


  • tk2393
    started a topic outer join with sum

    outer join with sum

    I need to figure out a query in MS Access to combine two intersecting tables into one, where the intersecting values are summed.

    Example:
    Table1:
    ID value
    1 10
    2 20
    3 30

    Table2:
    ID value
    2 40
    3 60
    4 80

    ResultTable:
    ID value
    1 10
    2 60 ( = 20 + 40)
    3 90 ( = 30 + 60)...
    See more | Go to post
No activity results to display
Show More
Working...