Results 1 to 6 of 6
  1. #1
    bangemd is offline Novice
    Windows XP Access 2002 (version 10.0)
    Join Date
    May 2009
    Posts
    18

    Match up table using only a few charecter?

    I want to create a query that match this two field

    first table


    second table




    the query will combine 2 table into 1 that have partner in the format of the second table 3 character long and name, extension, transaction, and data.

    Thanks a millions

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The Partner field is just Right([Partner],3) is that helps.

  3. #3
    bangemd is offline Novice
    Windows XP Access 2002 (version 10.0)
    Join Date
    May 2009
    Posts
    18
    Thank you for the quick reply, what if the 3 partner code is not locate at the right, but sometime on the left and sometime in the center. Is there a way to generate a query for that.

    Thanks

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You have not supplied enough information to answer the question with any accuracy. If you do not know where in the string the Partner code will appear or what the Partner code looks like, then how do you propose locating the string?

  5. #5
    bangemd is offline Novice
    Windows XP Access 2002 (version 10.0)
    Join Date
    May 2009
    Posts
    18



    what I mean is the three letter partner code is mix in the text is there away that we can match the these 2 table up. since they both have the 3 letter code one just happen to be with other text in between.

    thank you ruralguy

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    InStr() can help locate the three letter code but might be prone to errors if there is a duplicate because of the additional letters in the one field. How many records are we dealing with in the two tables? How often does this need to happen? Does either table have a PrimaryKey?

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

Similar Threads

  1. Match Records between TableA and TableB
    By friskydingo in forum Queries
    Replies: 0
    Last Post: 12-03-2008, 09:17 AM
  2. Replies: 1
    Last Post: 06-20-2007, 07:26 PM
  3. Finding data that doesn't match
    By dlhayes in forum Queries
    Replies: 1
    Last Post: 11-11-2006, 08:14 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