Results 1 to 2 of 2

Thread: need assistance with complex sql statement

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Posts
    168
    Hello I am trying to put together an SQL statement that gathers information from two tables. Here is what I am trying to do.. The [Inventory Sold] table lists all of the parts that were sold, and the [Inventory] table is the table with all of the inventory information. The [Inventory Sold] table only has the fields Number, Description, and Qty. I am using COUNT/GROUP in my statement so only one instance of "Number" in the [Inventory Sold] will show up in the recordset and the count to return how many times it was actually there. I got that part all down and dandy, but I need to know how to get the PRICE from the [Inventory] table where the Number from [Inventory Sold] = Number from [Inventory].

    This SQL statement works but it does not have the PRICE from [Inventory] included:

    SELECT Number, Description, Qty, COUNT(Number) as Sold FROM [Inventory Sold] GROUP Number, Description, Qty


    Now.. sorry for all the babble.. how do I modify that to add the PRICE from the [Inventory] table into it?

    Thanks,
    Thai

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Posts
    168

    I figured it out

    Nevermind everyone, after racking my brain for a while I pieced together an SQL statement that works perfectly.. whew! Thanks anyway

    Thai

Posting Permissions

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



Click Here to Expand Forum to Full Width