MS Query, Join 2 data sources using partial match

Android8675

New Member
Joined
Jan 5, 2007
Messages
23
(Excel 2007)
I've been trying to track down the exact way to do this, and I just can't seem to get it. So stop me if I'm doing this all wrong.

I have a ODBC data source which consists of a lot of manufacturing BOMs (Bill of Materials), now a customer wants us to make a list of all their boms by part#.

Their part numbers are 6-12 alpha numeric part#'s.

We store the BOMs as the part# + Rev. in our database.

What I want to do is query the data and "join" the list that they want extracted.

What I did was load up all the BOM data onto a table, and the list of part#'s from the customer on a second table. Saved as Excel.

Opened a new Workbook and used MS Query to pull in the 2 tables from file #1.

Now if I join the list of parts to our part# + Rev field, I don't get anything. But I added some part#'s with Rev to their list and it worked.

Suggestions? I need some kind of partial match. For instance if their part# is "123456", then "123456 A" would match. I was trying editing the query's "WHERE" statement, but the syntax is eluding me.

Original, basic JOIN that MS Query wizard adds.
Code:
WHERE `'Filter List$'`.Column1 = `'BOM Query$'`.BKBM_PARENT
tried something like this:
Code:
WHERE `'Filter List$'`.Column1 Like `'BOM Query$'`.BKBM_PARENT & "*" OR  `'BOM Query$'`.BKBM_PARENT Like `'Filter List$'`.Column1 & "*"
Hope that's enough, info, but let me know if more information is needed.

Thanks in advance,
-Andy
 
Last edited:

Forum statistics

Threads
1,082,253
Messages
5,364,045
Members
400,776
Latest member
JimmyLee

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top