I'm trying to match some values from a large table against a smaller one. Table_A has roughly 1,000 rows and Table_B has roughly 600 rows. I know the result should be no more than a few hundred rows, but searching manually through Table_A will take quite a while. I tried the following in Access 2003:
where columnA is from Table_A and columnX is the column from Table_B I want to compare against. This returns roughly 30 matches which is way off. The problem is some of the matches will actually end up being a partial match since they weren't entered the same on both tables. I tried doing the following:
This returns no results and come to find out Access 2003 doesn't like the 'SUBSTR()' function. An example of the match I'm talking about is having 'ABCXYZ' in columnA and the corresponding value in columnX would be 'ABCXY' or 'ABCXYZ' in columnA maps to 'ABCXXZ' in columnX. Is there any other way to accomplish this?
PHP:
SELECT columnA, others
FROM Table_A, Table_B
WHERE columnA = columnX;
where columnA is from Table_A and columnX is the column from Table_B I want to compare against. This returns roughly 30 matches which is way off. The problem is some of the matches will actually end up being a partial match since they weren't entered the same on both tables. I tried doing the following:
PHP:
SELECT columnA, others
FROM Table_A, Table_B
WHERE columnA LIKE "%(SELECT SUBSTR(columnX,0,9) FROM Table_B)%";
This returns no results and come to find out Access 2003 doesn't like the 'SUBSTR()' function. An example of the match I'm talking about is having 'ABCXYZ' in columnA and the corresponding value in columnX would be 'ABCXY' or 'ABCXYZ' in columnA maps to 'ABCXXZ' in columnX. Is there any other way to accomplish this?