This is an extension to this question.
Here I have the same problem with a slightly different situation.
The following is two tables in a database
tblTemp
TempPK AutoNumber
PsNo String
tblOrders
OrderPK AutoNumber
PsNo String
Both tables have several more fields, but the only common field between them is PsNo. No relationship between them.
What @Minty and @isladogs suggested in previous thread, searches for an exact match between PsNo in two tables.
Here I'm looking for a way to do the same thing but with a fuzzy match.
I need to check for only 9 digits of PsNo in both tables (from left) and not the whole string..
Let me give you an example:
tblTemp
tblOrders
The query must return only the second record of tblTemp, because left 9 digit of 245717248-00 doesn't exits in tblOrders.
But left 9 digit of first record has 2 occurrence and the third record has 3 occurrence in tblOrders.
I know this situation is very odd, but any kind of help is appreciated.
Here I have the same problem with a slightly different situation.
The following is two tables in a database
tblTemp
TempPK AutoNumber
PsNo String
tblOrders
OrderPK AutoNumber
PsNo String
Both tables have several more fields, but the only common field between them is PsNo. No relationship between them.
What @Minty and @isladogs suggested in previous thread, searches for an exact match between PsNo in two tables.
Here I'm looking for a way to do the same thing but with a fuzzy match.
I need to check for only 9 digits of PsNo in both tables (from left) and not the whole string..
Let me give you an example:
tblTemp
TempPK | PsNo |
1 | 245389447-00 |
2 | 245717248-00 |
3 | 245730245-00 |
tblOrders
OrdersPK | PsNo |
1 | 245389447-00* |
2 | 245389447-00A |
3 | 245730245-00 |
4 | 245730245-01 |
5 | 245730245-00B |
The query must return only the second record of tblTemp, because left 9 digit of 245717248-00 doesn't exits in tblOrders.
But left 9 digit of first record has 2 occurrence and the third record has 3 occurrence in tblOrders.
I know this situation is very odd, but any kind of help is appreciated.