Results 1 to 2 of 2
  1. #1
    Justh8me is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    1

    Question find dups over 4 files

    Sorry if this is not the right place for this.

    I have 4 files, all are .csv's all contain 2 fields: Account #, Namespace
    I need to find if I have any account #'s that match in all of the namespaces. I have done a simple query. But I did it as a namespace A-B, A-C, A-D, etc. My issue is if I have accounts that are in 3 namespaces, or even all 4 I need to see them.

    I know I can throw them in excel but the problem is there are 614K accounts, and if I want to do a lookup I need to have them in twice, which makes it 1.2 million records. And it is killing my PC to do it that way. My obvious problem is that I am a bit new to Access.

    What is the best way to scrub for duplicates across these 4 files?

    For instance:
    File 1 File 2 File 3
    1111 A 1110 B 1111 C


    1112 A 1111 B 1119 C
    1113 A 2222 B 1113 C

    So in this example I would need to report account number 1111 is in namespace A, B, and C. And 1113 is in A and C.

    Any help would be greatly appreciated.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Easiest is to import the csv files into one table, then run a Fine Dups query.

    I imported the csv files into a table "AccountNums"
    Code:
    Account Namespace
    1111 A
    1112 A
    1113 A
    1110 B
    1111 B
    2222 B
    1111 C
    1119 C
    1113 C
    Then used the wizard to create the find duplicates query:
    Code:
    SELECT AccountNums.Account, AccountNums.Namespace
    FROM AccountNums
    WHERE (((AccountNums.Account) In (SELECT [Account] FROM [AccountNums] As Tmp GROUP BY [Account] HAVING Count(*)>1 )))
    ORDER BY AccountNums.Account;
    The result is:
    Code:
    Account Namespace
    1111 C
    1111 B
    1111 A
    1113 C
    1113 A

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

Similar Threads

  1. simple insert into without dups syntax (?)
    By markjkubicki in forum Queries
    Replies: 2
    Last Post: 05-08-2013, 08:07 AM
  2. Dups created in queries
    By ekoschik in forum Import/Export Data
    Replies: 11
    Last Post: 03-21-2013, 06:42 PM
  3. Full app - find/store/open files in a table of any type
    By pkstormy in forum Sample Databases
    Replies: 2
    Last Post: 02-03-2012, 01:19 PM
  4. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  5. dups
    By slimjen in forum Queries
    Replies: 9
    Last Post: 10-28-2011, 02:48 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