Search code examples
sqlms-accessrelationshipfuzzy-search

Access Query link two tables with similar values


I am trying to create a select query in access with two tables I want to link/create a relationship.

Normally, if both tables contains same value you can just "drag" and create a link between those two columns.

In this case however, the second table have an " /CUSTOMER" added at the end in the fields.

Example; Table1.OrderNumber contains order numbers which always contains 10 characters

Table2.Refference contains same order numbers, but will have a " /CUSTOMER" added to the end.

Can I link/create a relationship between these two in a Query? And how?

Thanks for the help! Sebastian


Solution

  • Table1.OrderNumber contains order numbers which always contains 10 characters

    If so, try this join:

    ON Table1.OrderNumber = Left(Table2.Reference, 10)