Results 1 to 2 of 2
  1. #1
    shanky365 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    13

    Addition of similar coded items in query

    I have a database in which i have extraxted a query where i get
    Item Code - Items - Total quantity - Quantity Issued

    how can i add up the issued qty based on item code.


    Nw suppose item coded 321 was bought 10 nos. has 3entries in Db, 2 nos issued every time. so i should get info that Item 321 ;issued qty is 2+2+2= 6 .
    But total qty should not be added i.e it should be 10 and not 30.

    Plz note that items name can be skightly diff like "red ring" or maybe "ring red" but code for both is same 321.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Not sure I like the design, but try a totals query:

    SELECT ItemCode, Max(TotalQuantity) AS TotQuant, Sum(QuantityIssued) AS SumQuantity
    FROM TableName
    GROUP BY ItemCode
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 09-21-2012, 11:12 AM
  2. Grouping Similar Items
    By igendreau in forum Queries
    Replies: 4
    Last Post: 07-29-2011, 06:53 AM
  3. Replies: 3
    Last Post: 05-23-2011, 01:52 PM
  4. Replies: 1
    Last Post: 07-07-2009, 01:00 PM
  5. addition with 0
    By Peljo in forum Access
    Replies: 0
    Last Post: 02-28-2008, 08:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums