Results 1 to 3 of 3
  1. #1
    DaveT99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    76

    How to Extract Duplicate Key Fields where a 2nd Field (Description) is different

    I have a single table called SPARES
    The table has 3 fields, Stock_No, Store_Id, Description
    In this data set there are duplicate Stock_Nos because



    • Same stock_no is held in different storage locations on site (Stock_no is linked to its makers part number)
    • But also there are true duplicates, same stock No in same location

    In some cases the part description has been created differently for the same stock_no

    I would like to extract all duplicate stock Nos where the descriptions are different

    I made a query to extract the duplicate stock Nos and another to show where the same stock no was located in the same store location (True duplicate)

    I then tried creating a 3rd query based on the duplicate stock no query, but am struggling to extract the records with duplicate Stock_Nos but with different populated descriptions
    Can anyone help?
    Maybe it be done in a single query by you clever people?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    make a query,
    bring in the table: SPARES twice
    (it looks like: SPARES, SPARES_1)

    join on Stock_no

    bring down the fields:SPARES.Stock# and SPARES.description
    under criteria for SPARES.description, put:
    <> SPARES_1.description

  3. #3
    DaveT99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    76
    Hi VIP (Ranman256)
    Thanks for the rapid response, incredible. Tried it on a demo dB and didnt seem to work, but tried on the real dB and appears to work perfectly
    Many many thanks what a simple solution ........of course you need the knowledge/experience to be able to do that
    many thanks again
    Dave
    ps seem to have issues logging on this morning when logged on couldnt see the post and when not logged could I think caused by this morning accepting AVAST as my default browser, now got rid and everything normal

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

Similar Threads

  1. Replies: 1
    Last Post: 08-04-2018, 02:43 AM
  2. Replies: 1
    Last Post: 05-02-2018, 11:42 AM
  3. Replies: 3
    Last Post: 10-18-2017, 06:57 PM
  4. Replies: 7
    Last Post: 08-19-2016, 08:16 AM
  5. Replies: 2
    Last Post: 08-24-2012, 07:28 AM

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