Results 1 to 2 of 2
  1. #1
    espinobj is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    3

    Help with duplicate query


    Code:
    SELECT Master.[Cable ID], Master.[Main S/N], Master.Date, Master.Time, Master.[Length Feet], Master.Floor, Master.Closet, Master.Rack
    FROM Master
    WHERE (((Master.[Cable ID]) Not Like "*TRC*") AND ((Master.[Media Type])<>"Twisted Pair")) AND 
    ((Master.[Main S/N]) In (SELECT [Main S/N] FROM [Master] As Tmp GROUP BY [Main S/N],[Date],[Time] HAVING Count(*)>1  And [Date] = [Master].[Date] And [Time] = [Master].[Time]))
    ORDER BY Master.[Main S/N], Master.Date, Master.Time;
    I need some assistance. Im still very new to SQL. This shows me duplicated for our results that match based on Date, Time and Main S/N. They must match all 3 in order to be considered a duplicate. My results only show one of the two duplicates which is great as I know I have an issue however I need to see both results not just one. Can I get some help Thank you!

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    This will show all duplicates with the criteria you have. Show us all records so that we can see why only the one is being displayed, and what could possibly be causing the exclusion.

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

Similar Threads

  1. SQL QUERY - Duplicate
    By fluffyvampirekitten in forum Access
    Replies: 1
    Last Post: 01-20-2016, 12:11 PM
  2. Duplicate Query
    By capjlp in forum Queries
    Replies: 4
    Last Post: 11-10-2014, 10:03 AM
  3. SUm duplicate values then delete duplicate rows
    By DonKaponne in forum Queries
    Replies: 1
    Last Post: 09-14-2014, 04:18 PM
  4. Regarding duplicate records in a query
    By ritimajain in forum Queries
    Replies: 30
    Last Post: 07-18-2013, 11:00 PM
  5. Replies: 3
    Last Post: 03-01-2013, 12:41 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