Results 1 to 5 of 5
  1. #1
    jazzin is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2013
    Posts
    14

    Trying to match a column from one table to a column in another


    hi all, I have a table from a vendor that contains addresses and street names and I have our table which is a master table that contains all their records plus some others. I have created a query to show all the records that match and all the records that don't match. Most of the records that don't match are bc of misspellings. This is what I have so far. SELECT ADDRESSL.ACCOUNT_NO, ADDRESSL.LASTNAME, ADDRESSL.FIRSTNAME, ADDRESSL.LUTCHER_AD, ADDRESSL.NOTES, ADDRESSL.CITY, ADDRESSL.STATE, ADDRESSL.ZIPCODE, ADDRESSL.STREETNO, ADDRESSL.STREETNAME, ADDRESSL.PO_BOXFROM ADDRESSL LEFT JOIN Address1 ON ADDRESSL.STREETNAME=Address1.ST_LABELWHERE (((Address1.ST_LABEL) Is Null));I want to add another field to this table which contains the corrections for them to update on their end but am not having any luck in doing this. If anyone can help me with this, it would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Find Unmatched queries can only tell you that there is data in a table not in another table. How do you expect to relate records when data doesn't match? Unless both tables have the ACCOUNT_NO that can be used to link the records and compare the respective addresses side-by-side, correcting data will be a tedious and time-consuming case-by-case examination of records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jazzin is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2013
    Posts
    14
    Quote Originally Posted by June7 View Post
    Find Unmatched queries can only tell you that there is data in a table not in another table. How do you expect to relate records when data doesn't match? Unless both tables have the ACCOUNT_NO that can be used to link the records and compare the respective addresses side-by-side, correcting data will be a tedious and time-consuming case-by-case examination of records.
    Thanks for the reply. STREETNAME in their table has misspellings in it. I would like to add our streetnames, which are correct, to this table but only the names that match the misspelled names in their table. Is their anyway to do this with a LIKE statement or using a wildcard?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Pattern matching would be unreliable. What part of which string should be used to match with the other string? Unless you want to write code that matches letter by letter until deviation is encountered, it really won't work. And doesn't matter how thorough you think the procedure is, won't catch them all.

    Really need to link on unique ID.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    jazzin is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2013
    Posts
    14
    Quote Originally Posted by June7 View Post
    Pattern matching would be unreliable. What part of which string should be used to match with the other string? Unless you want to write code that matches letter by letter until deviation is encountered, it really won't work. And doesn't matter how thorough you think the procedure is, won't catch them all.Really need to link on unique ID.
    OK Thanks, It was only 535 records that didn't match. I just exported it out to EXCEL and manually copied and pasted the correct spellings into the new field. Just was wondering if there was a way to do this through a query.

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

Similar Threads

  1. Replies: 2
    Last Post: 10-29-2013, 04:38 PM
  2. Find an Exact Match in a Access Table column
    By raghavendran in forum Access
    Replies: 4
    Last Post: 10-12-2013, 11:57 AM
  3. Replies: 4
    Last Post: 09-04-2013, 06:40 AM
  4. Replies: 6
    Last Post: 01-13-2012, 09:17 AM
  5. Adding text to column if match
    By niihla10 in forum Access
    Replies: 0
    Last Post: 08-26-2009, 01:39 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