+ Reply to Thread
Results 1 to 2 of 2

Run query from two tables

  1. #1
    Registered User
    Join Date
    09-30-2008
    Location
    USA
    MS-Off Ver
    2010
    Posts
    36

    Run query from two tables

    I need to run a query from two tables.

    Table 1 is Orders; there is a non-calculated field named Estimated Cost and the OrderID among other fields.
    Table 2 is Payments, and there is a OrderID, Payment and Date among other fields. Both tables are related by the OrderID field. There could be multiple payments to a single order on the Payments table.

    I need:
    1- Sum all payments in the Payment table grouped by order.
    2- Subtract above sum from the correspondent Estimated Cost on table Orders.
    3- Display the result on 2 above if it is >0.

    I'm not too experienced in Access and this is really driving me crazy. I someone help me achieve this.

    Thanks in advance!

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Run query from two tables

    Hi,

    Is this a homework assignment?

    If not, then post the SQL query you've tried so far.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1