Question : Relate tables with no exact matching field

I need to relate two tables in Access where the "REC" field in table 1 has 7 characters, and the "REC2" field in table 2 has 10 characters, the first 7 of which match the REC field of table 1.  For example

Table1             Table2
REC column     REC2 column
AAAAAAA      AAAAAAAA-38
BBBBBBB        BBBBBBBB-89
CCCCCCC        CCCCCCC-24

Can you use a formula in a relationship, such as REC=LEFT(REC2,7)?

I'm an Access light-weight, so I'll need fairly specific instructions.

Answer : Relate tables with no exact matching field

witzph1 said:
>>I'm getting an error on syntax.  Do you see the error?

Yes.  You are missing a double quote, plus the aliases are messed up.

Try:

SELECT PINFO.REC, PINFO.NAME, PINFO.PEMAIL, POLICY.POL_IDX, POLICY.PR_P
FROM PINFO INNER JOIN POLICY ON POLICY.POL_IDX LIKE PINFO.REC & "*"
Random Solutions  
 
programming4us programming4us