Results 1 to 6 of 6
  1. #1
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114

    Removing duplicate record from a query

    I have a query that pulls data in the following format:

    A - B


    1 - 2
    1 - 3
    2 - 4
    3 - 5

    I want the query to eliminate record 1 - 2 and keep 1 - 3. Is that possible?

    Everything I've read tells me I can only eliminate duplicate records that are identical, therefore a query won't remove record 1 - 2 because the second column has a different value.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Try

    SELECT A, Max(B) As MaxB
    FROM TableName
    GROUP BY A
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114
    Yup, that worked. Thanks. That was driving me nuts.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help! Just noticed you live nearby. Greetings from north of you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114
    I take it you're in Reno? That's about the only thing north of Carson. Well... that and a whole bunch of nothing. :-)

    BTW - You can mark this as solved.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Done; it's in Thread Tools by the way.

    Yep, in the biggest little city.
    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: 11
    Last Post: 03-17-2015, 05:10 PM
  2. Removing A Record From Report Query
    By wes9659 in forum Queries
    Replies: 1
    Last Post: 02-10-2015, 10:32 AM
  3. Removing Duplicate records
    By Brett1230 in forum Access
    Replies: 2
    Last Post: 01-28-2015, 01:22 PM
  4. Removing duplicate records with macros
    By sevanty7 in forum Access
    Replies: 1
    Last Post: 05-08-2013, 08:11 AM
  5. Helo with removing duplicate values in a query
    By David Sabot in forum Queries
    Replies: 1
    Last Post: 04-22-2013, 12:26 PM

Tags for this Thread

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