+ Reply to Thread
Results 1 to 5 of 5

Query Question with Partial Matching

  1. #1
    Registered User
    Join Date
    05-26-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Query Question with Partial Matching

    Ok so I am not advanced with Access at ALL. I had 2 seperate spreadsheets in Excel. I have a list of Employees from our internal system and I also have a list from one of our vendors. I need to compare our inventory to theirs but sometimes they use a alternate first name when they submit a request to the vendor.

    Example:

    Our Inventory:
    Brown, Michael

    Their Inventory:
    Brown, Mike

    When I run a query to compare both lists in access it won't match these two because they need to be identical. Is there a way to make it look for partial matches?

    I use the wizard to create the query but here is the SQL being used.

    Please Login or Register  to view this content.

    Can anyone help me out and explain? I understand the code's logic...

    Thanks!
    Last edited by NBVC; 05-06-2011 at 03:52 PM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Query Question with Partial Matching

    Hi patnyc,

    Here's one of the best VBA tools for attempting to accomplish the type of task you're currently facing.

    It's complexity serves as a fitting reminder as to why we use proper numerical keys as opposed to people's names to match records in databases.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    05-26-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Query Question with Partial Matching

    Quote Originally Posted by ConneXionLost View Post
    Hi patnyc,

    Here's one of the best VBA tools for attempting to accomplish the type of task you're currently facing.

    It's complexity serves as a fitting reminder as to why we use proper numerical keys as opposed to people's names to match records in databases.

    Cheers,
    Hi, Thanks for the reply. I wish it was that simple. Unfortunately, our end does but their end does not. We have unique identifiers but our vendors will send us csv or excel files with just raw data from their database.

    Thanks for the link, I'll take a look.

  4. #4
    Registered User
    Join Date
    05-26-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Query Question with Partial Matching

    Would I some how be able to use the Left syntax?

    It's listed as Last, First (i cant compare it to JUST the last names because of common names like "brown".


    Right now the results from the query come up like this:

    Brown, Mike | Brown, Mike
    Smith, Christoper | [empty cell]

    Now, the way I confirm the MATCH is if the matching name is next to it. There is a Smith, Chris in the list I'm comparing it too but it wont match it with that code I pasted above. How would i incorporate a usage of Left and let's say the first 5 characters? This way it would match 'Smith, Christoper' and I would also be able to see a incorrect match of "Smith, Christian". As long as the matches are visible it would help me greatly.

    let me know if you can help...I've been trying to understage the logic behide the main code but my Access 2007 book hasn't arrived yet.

  5. #5
    Registered User
    Join Date
    05-26-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Query Question with Partial Matching

    I figured it out!

    I view the results and see if there is an actual match. This works really well.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1