RE: Join Query Expression
- From: GMD <GMD@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Feb 2009 07:07:02 -0800
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.
- Follow-Ups:
- RE: Join Query Expression
- From: Jerry Whittle
- RE: Join Query Expression
- References:
- Join Query Expression
- From: GMD
- RE: Join Query Expression
- From: Jerry Whittle
- Join Query Expression
- Prev by Date: Re: Trim questerion
- Next by Date: Re: Trim questerion
- Previous by thread: RE: Join Query Expression
- Next by thread: RE: Join Query Expression
- Index(es):
Relevant Pages
|