Results 1 to 2 of 2
  1. #1
    DENSAN is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    1

    Identify and separate duplicate coordinates

    Hello,
    I have a text file with coordinate points (XYZ in CSV format) and for the final result I need to have the following:
    • Identify records with duplicate XY values
    • Create a new list with unique values XY (Z value included)
    • Export a separate list of all duplicate XY values
      (Z value included)



    I am new to access but getting familiar with queries and tables. I would like some suggestions on the correct approach and what tools to use in this learning process.
    As a starting point I was thinking about creating a math query to create an identifier (i.e. X Value - Y Value = Duplicate tag) then query using duplicate tag.
    My attachment is just a small part of the entire dataset and the order of the records is not important.
    Thanks,
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    An aggregate query can identify duplicates:

    SELECT SampleData.X, SampleData.Y, Count(SampleData.Z) AS CountOfZ
    FROM SampleData
    GROUP BY SampleData.X, SampleData.Y
    HAVING (((Count(SampleData.Z))>1));

    An aggregate query can return unique XYZ:

    SELECT SampleData.X, SampleData.Y, SampleData.Z
    FROM SampleData
    GROUP BY SampleData.X, SampleData.Y, SampleData.Z;

    Or:

    SELECT DISTINCT x, y, z FROM SampleData;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Finding Coordinates
    By QuickJeff in forum Queries
    Replies: 6
    Last Post: 07-04-2016, 01:58 AM
  2. Replies: 1
    Last Post: 02-09-2016, 09:03 PM
  3. Need help with coordinates query
    By matt_fdz in forum Queries
    Replies: 4
    Last Post: 05-19-2015, 10:36 PM
  4. Replies: 1
    Last Post: 03-28-2013, 07:21 PM
  5. Replies: 3
    Last Post: 01-08-2011, 05:40 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