Reputation: 33
I have searched Stack Overflow and cannot find a way to match two fields based on the only the last three letters of the second field. I am not great at VBS but can get by. Here are the details:
Microsoft Access 2010. This is and Aircraft registration database. The first 4 letters in a field have a consistent length in the first database. Eg.
FABC GPJR IDTC GPPC
The intended join field in the second database can look like this:
CFABC C-FABC ABC C-GPJR GPJR PJR CGPJR
I just need to take the last three letters in the first table and the last three letters in the second table and match them. It will likely be a make table query.
Any help would be appreciated.
Jeff
Upvotes: 0
Views: 25
Reputation: 856
The syntax is as such:
SELECT ID
FROM Table1, Table 2
WHERE (((Right([Table1].[ID],3))=Right([Table2].[ID],3)));
Upvotes: 1