Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Feb 2003
    Thanked 0 Times in 0 Posts

    finding first ten characters (XP)

    (Edited by HansV to provide link to post - see <!help=19>Help 19<!/help>)

    This is what I'm trying to do: I need to compare two tables and if there is a match, take the one from the customer table. I took two tables and made sure they each had no duplicates. I added a column in which I marked which table they were coming from (cust and wecc) and then brought them together in a union query. I made a new table from the union query and now I'm running a duplicates query on that table. The problem is, I need to find duplicates on firstname, lastname, and then the first 5 or 10 characters of the address. I also need to choose that if there is a duplicate, I want the one from the "cust" table. I found this - <post:=137782>post 137782</post:> - but I need to know if it applies to what I want to do, and if so, further explanation on where to run this - do I make a query? Where do I put that code?


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: finding first ten characters (XP)

    The code from <post:=137,782>post 137,782</post:> is meant to be used for text values with lots of spelling variations. If you want to use it:
    - Create a new module by clicking New in the Modules section of the database window.
    - Copy and paste the code from <post:=137,782>post 137,782</post:> into the module window.
    - Create a query based on your new table.
    - Add the fields you need.
    - Create a calculated column, using the name of the address field instead of AddressField.

    SndExAddress: Soundex([AddressField])

    - Switch to dtasheet view to check the result.
    - The SndExAddress field should show codes such as D412 or F520.
    - Save the query.
    - Create a Find Duplicates query based on the query you just saved.

    You'll have to take more steps than this (it's a rather involuted process), but try these first.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts