Results 1 to 5 of 5
  1. #1
    keat63 is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    5

    help with Duplicates

    Folks

    I'm not really a big access user.
    I've somehow always managed to do what I need to do using Excell.

    However, I have a very large database, that won't even open in excell.
    So i have to use access.



    I have a list of customer names, addresses, telephone, fax, postcode etc.
    In the same database is a list of customers who havn't bought.

    The two are indentifiable with a field named "type".
    customers are "all", none buyers are "enq"

    I've already run a duplicates query (using the find duplicates query wizzard), but I think I need to get a little more clever.

    I'd like to run a duplicates query based on the first 3 letters of the company name and cross reference this with the first 3 letters in the postcode.

    eg. Garage Works at LS27 12Z
    Id like the query to use Gar and LS2

    How would I modify the query to do this please ?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Please show the names of the tables and the fields.
    What have you tried? What results?

  3. #3
    keat63 is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    5
    Quote Originally Posted by orange View Post
    Please show the names of the tables and the fields.
    What have you tried? What results?
    If I run a duplicate query wizzard against the column "name" and column "postcode" and list the colmns "address" and "type" as additional info, it results me 71,600 duplicates. of which 93 are from the type "ENQ"
    I can deduce from this that 93 entries with the column type "ENQ" are also listed as type "ALL"

    I bet this isn't making much sense is it. ?

    I'm currently changing the attributes of the columns "Name" and "postcode" to limit them to 4 and 3 characters resepctively.
    I'm hoping that re-running the query will give a different set of results.

    Which it does, so I can now run the report.
    I think I may have sorted it, in one form or another.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    If the database found 71000 duplicates based on the entire company name and the entire postal code you have a ton of duplicates and chopping off the trailing information in your company name and postal code fields will do nothing to make that number go down, if anything it will make it increase

    For example
    company PostalCode
    Garage 1 ABCD EFG
    Garage 2 ABCD EFG

    assume this is your entire data set. If you run a find duplicates on this you will end up with 0 results. If you do a find duplicates based on the first three letters of the company and the first three characters of the postal code you'll get 1 match.

    Likewise if you have

    company PostalCode
    Garage1 ABCD EFG
    Garage 1 ABCD EFG

    Although these are the same company if you perform the find duplicates on the entire field you will find no matches but 1 if you check the first three digits. So you are likely to end up with *more* matches rather than fewer if you limit the string to the first x characters.

    Are you trying to remove all duplicates from your tables? If so your best bet, most likely is to do it with code and to append all the 'deleted' items to a secondary table so you can review what was moved and retain it 'just in case'. I'd likely do that with VB code rather than a query.

  5. #5
    keat63 is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    5
    I've just been into the sales office and questioned the 70,000 duplicates and understand why they are there.
    The data is taken from a data file.
    When ever a customer record is changed, rather than the info being deleted, it actually duplicated.
    Rather silly if you ask me, but I didn't write the app.

    This is the reason why my boss wanted to run the duplicates query based on cut down info.

    I'm only really interested in the ones marked "ENQ".
    These are customer enquiries, who may now be actual customers.
    So by changing the fileds to contain less characters, has produced a report with more "ENQ" entries.. which is what I wanted.
    It's now up to someone else to go through them on the app and remove or qualify them.

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

Similar Threads

  1. keep getting duplicates
    By MichaelMic in forum Queries
    Replies: 3
    Last Post: 05-15-2011, 10:37 PM
  2. Getting rid of duplicates
    By anemoskkk in forum Access
    Replies: 1
    Last Post: 04-17-2011, 11:24 AM
  3. Don't count duplicates
    By shenberry in forum Queries
    Replies: 1
    Last Post: 10-27-2010, 09:28 PM
  4. duplicates
    By Roberta in forum Queries
    Replies: 5
    Last Post: 09-10-2010, 07:31 PM
  5. Pulling out duplicates
    By FREEEEEEDOM in forum Access
    Replies: 1
    Last Post: 04-21-2009, 10:37 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