Results 1 to 3 of 3
  1. #1
    Dutchie is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    2

    Post Make Table Query a

    Hello



    I am a rookie when it comes to access. I managed to get the problem working before but I lost the coding
    have been browsing the internet for a few days but can't find what I am looking for that would help me out.
    So hope y'all can help me out.

    I have a linked table to a XLS on the computer. The linked table contains duplicates and I wan to generate a new table without the duplicates. Using the table generate query.

    the xls sheet looks like this

    Item ID Item Description Qty On Hand
    123 222 10
    123 222 0
    123 222 0
    456 555 0
    456 555 0
    789 888 5
    789 888 0
    789 888 0


    The following is what I want to achieve

    123 222 10
    456 555 0
    789 888 5

    Basically that I keep in record and keep the one with the highest value or keep a QTY of 0 if all duplicate records are zero

    I am puzzled and would appreciate y'alls help

    Dutchie

  2. #2
    Dutchie is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    2

  3. #3
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    This query should give you the highest value for any given "Item ID" and "Item Description".

    SELECT TableXLS.[Item ID], TableXLS.[Item Description], Max(TableXLS.[Qty On Hand]) AS [MaxOfQty On Hand]
    FROM TableXLS
    GROUP BY TableXLS.[Item ID], TableXLS.[Item Description]
    ORDER BY TableXLS.[Item ID], TableXLS.[Item Description];

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

Similar Threads

  1. Replies: 2
    Last Post: 02-17-2015, 01:01 PM
  2. Replies: 1
    Last Post: 03-11-2014, 11:30 AM
  3. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  4. Replies: 2
    Last Post: 10-27-2009, 07:09 AM
  5. Make a table query
    By Fiona in forum Access
    Replies: 4
    Last Post: 06-25-2009, 11:24 AM

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