Results 1 to 2 of 2
  1. #1
    Wahnsinn is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    2

    Find Duplicates Query - Excluding Items

    Hi guys, I'm working on some queries to help identify duplicates within a set of data we've got (invoices) and this query is great. The only issue I'm coming across is when I use the query for different types of checks, I don't have a way within the query to exclude duplicate checks.

    For example, my first query looks for duplicates where the invoice number, invoice date, invoice amount, and vendor ID exactly match. The second query is where the vendor ID, invoice date, and invoice amount exactly match, but the invoice number is just similar.

    Problem is, all the items that show on the first query are also going to show on the second query, along with the new items.

    I attempted to add some text to the criteria ([TranNo]<>[TestData].[TranNo]), but that killed the query and returned no results.

    I'm also not able to just export and run a vlookup to exclude all items from the first query, as one of those duplicates could match with a similar invoice from the second query (leaving the similar item by itself).

    I've been searching the last few days but have come up empty-handed thus far.

    Any thoughts?



    Thanks in advance!

    Tim

  2. #2
    Wahnsinn is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    2
    FYI, here's the criteria for the second query (used the wizard):

    In (SELECT [VendID] FROM [TestData] As Tmp GROUP BY [VendID],[ExtractTran],[TranDate],[TranAmtHC] HAVING Count(*)>1 And [ExtractTran] = [TestData].[ExtractTran] And [TranDate] = [TestData].[TranDate] And [TranAmtHC] = [TestData].[TranAmtHC])

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

Similar Threads

  1. Replies: 14
    Last Post: 09-21-2012, 11:12 AM
  2. Find duplicates query to populate input form
    By kctalent in forum Queries
    Replies: 6
    Last Post: 08-22-2011, 03:12 PM
  3. Excluding null values on SQL table query
    By DB2010MN26 in forum Queries
    Replies: 1
    Last Post: 09-03-2010, 12:54 PM
  4. Find Duplicates Query
    By mulefeathers in forum Queries
    Replies: 13
    Last Post: 04-22-2010, 05:39 PM
  5. Excluding data in a query
    By lpdds in forum Queries
    Replies: 1
    Last Post: 12-16-2009, 08:06 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