Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32
  1. #16
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    No worries. I appreciate all of your help. and...it worked!!!



    So a few questions, it looks like it went through each SDN list entry, compared it against every entry on my client list and returned any matches. And it did that for every SDN entry. Correct? I ask because it appears like some returned 50 of the same SDN list entry, so I should be able to run a remove duplicates to get a list of every entry that was a match right?

    With that question out of the way, I have one more to ask, and I'm not sure if it's possible, but I will give it a shot.

    This works for most entries, however, there may be a situation where the entry on the SDN list is Ramirez Herrara, where on the client list the last name may only be Ramirez. Using this query that would not be returned correct? Is there a way to get it to return if any word matches.

    Using the example above, an SDN list entry Ramirez Herrara. Can I have it return on the query if a client has the last name Ramirez or the last name Herrara?

  2. #17
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I've spent a LONG time trying to get something like that to work in my own situation and have not gotten any 100% successful method.

    For example, I'll have a list of names. to compare, I have to try to match..
    John Smith = John H Smith = John H. Smith = John Harrison Smith = John Smith Jr.. .etc

    itll never happen.

    As far as the duplicates go, I really cant say why it's happening without looking at the data. If there are duplicates in the tables, there will be duplicates in the results. Also, if you have, for example:
    ID - FirstName - LastName - Address
    1 - John - Smith - 123 anystreet
    2. - John - Smith - 124 anystreet

    you will get both, twice. It's somewhat of a cartesian product.

  3. #18
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    Duplicates is all sorted out. Not a big deal.

    Is there a way to show all matches where it's a match to everything left of the space? I think that would get me cose enought to appease the boss.

  4. #19
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Do you want to show "exists on SDN but not on clients" or "exists on clients but not on SDN"?

  5. #20
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    I'm not sure what your asking could you expand on that a bit?

  6. #21
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I'm sorry, I misread. What do you mean by "left of the space?"

  7. #22
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    Okay so a common theme for Latin Americans or Arab Entries on this list is to have mulitple last names. However on our client list and in America it is typical to only record the first last name part.

    So a common example would be an entry on the watch list having an entry Ramirez Herrera. On our client list however, we don't have an entry with a last name Ramirez Herrera, however, we do have a client with the last name Ramirez (the part left of the space). How do we get that the Ramirez on the client list to return even though it's not an exact match to the watch list data?

  8. #23
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    normally, you would use the Left() function in junction with the InStr() function to do this. However, in your case you would be doing it on the join itself. I've never tried to do that. I dont even know if it would work.

  9. #24
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    Let me run this by you and you tell me if this would work. I bring my list back out to excel. Run a text to columns so that each last name is contained in its own column. Bring that back to access.

    Write that language we did previously, but do it for each last name column on my list (lastname1, lastname2, etc.). Then remove any duplicate entries that are returned on the query. Would that work?

  10. #25
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    It could work. However, you still risk false positives.

    John, Smith James Wilson
    would match
    John, Smith Johnson Adams
    as they are both technically John Smith. Which one is the real one?

  11. #26
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    Right, unfortunately though my firm is very risk averse when it comes to these things and they would rather have false positives than miss one. Speaking of which how would i write it if i wanted it to match two fields (last name and DOB).

    Would it be

    SELECT *
    FROM SDNList INNER JOIN ClientList ON SDNList.LastName = ClientList.LastName AND SDNList.DOB = ClientList.DOB;

  12. #27
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    SELECT *
    FROM SDNList INNER JOIN ClientList ON SDNList.LastName = ClientList.LastName
    WHERE SDNList.DOB = ClientList.DOB;

    Would work...

    I would HATE to be named Muhammad and want to find a job at your place.

  13. #28
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    Don't worry. We don't stop at this point, we just have to manually go through the hits and see if they are actual matches are not. The problem with this particular list is, the data is very jumbled. If your interested in seeing what data I'm talking about, google "SDN List". Top link, scroll down for the CSV data source. Not common for the data of birth, id #, and job to be in one field. Only thing we can go on is "possible" name matches and then manually remove the rest.

  14. #29
    sai_rlaf is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    44
    How can I write to exclude null values?

  15. #30
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    in your WHERE statement include
    AND FieldName Is Not Null

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Stuck with combo boxes for ever !!! :(
    By Evgeny in forum Forms
    Replies: 9
    Last Post: 04-14-2010, 09:03 PM
  2. Stuck on Query
    By wes028 in forum Access
    Replies: 9
    Last Post: 01-14-2010, 08:33 AM
  3. Stuck on Join Query
    By Pimped in forum Queries
    Replies: 1
    Last Post: 10-26-2009, 10:54 AM
  4. Sigh, having used Access in 5 years and stuck..
    By Access Denied in forum Access
    Replies: 3
    Last Post: 10-06-2009, 02:19 PM
  5. Newbie Here & Stuck
    By FOZILD in forum Access
    Replies: 5
    Last Post: 09-24-2009, 08:26 AM

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