RE: Join Query Expression



Jerry, thanks for the response. I am having trouble with the syntax though.
the first table is COMMENTS, the field Name is in the order of Last,FirstMI.
The second table is SAMPLE, the field DEBTOR is in the order of FirstMILast.

"Jerry Whittle" wrote:

SELECT EmpNameLastFirstMI.txtEmpNameLastFirstMI,
EmpNameFirstMiLast.txtEmpNameFirstMiLast
FROM EmpNameLastFirstMI, EmpNameFirstMiLast
WHERE EmpNameFirstMiLast.txtEmpNameFirstMiLast
=Mid([txtEmpNameLastFirstMI],(InStr([txtEmpNameLastFirstMI],",")+1)) & " "
& Left([txtEmpNameLastFirstMI],(InStr([txtEmpNameLastFirstMI],",")-1));

Basically you need to rearrange the name in one table to match the other.
However if the layout of the name in either table is different, such as a
period after the middle initial or a space after the comma, the above won't
work. You may need to use code to get as many matches as possible then
manually fix the problem records. Then there's the problem of having more
than one Jim J Jones in either table....

If you are getting this data from another system, consider talking to them
to see if they can reformat their export to you so that both tables match.
--
Jerry Whittle - MS Access MVP 2007 - 2009
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder



"GMD" wrote:

Trying to join employee data from two tables with the employee names in
different order. Table 1 has employee name in this order: Brown,John A;
Table 2 has employee name in this order: John A Brown. Any help would be
greatly appreciated.
.



Relevant Pages

  • RE: Indexing service server 2008 iis7.0 error
    ... I do not know where I got that syntax but it does not work in Server 2008. ... "Jerry C" wrote: ... Dim daIS As New OleDbDataAdapter ...
    (microsoft.public.data.oledb)
  • Re: Case sensitivity in programming languages.
    ... Jerry, I think you caught the real reason here. ... For instance, when looking at someone else's code, I can tell that 'Employee' is a class object, while 'anEmployee' is an object of the Employee class, and employeeis an array of Employee objects. ... And when everyone uses the same conventions, you have less chance of conflicts between different programmers. ...
    (comp.lang.php)
  • Re: simple formlua in excel
    ... Jerry, I'm sorry I should have explained this better. ... track the production of each employee and how much production they do in ... definent amount of units they should do in a day. ...
    (microsoft.public.excel.programming)
  • Re: Secure Scripts
    ... You'd think a search on encoding vbscript would have ... Jerry ... > Microsoft Script Encoder ...
    (microsoft.public.windows.server.scripting)
  • Re: array question (newbie)
    ... Hello Jerry, ... And refering to a particular element, which syntax is correct? ... Simon Taylor ...
    (comp.lang.perl.misc)

Quantcast