A few days back I wrote a question here that got answered and helped me resolve what I thought at the time was my project:
Query only pulling in output from one column instead of all columns
This is what worked earlier and had no issues:
SELECT DISTINCT Product.Category, Analytics.Unique, Product.ID,
Product.Family
FROM Analytics INNER JOIN Product ON Analytics.Search = IIF(Product.Category
= Analytics.Search, Product.Category, IIF(Product.Field4 = Analytics.Search,
Product.Field4,));
At the time, I only thought I only am required to look for exact matches, I have since found out that I need to join on partial matches as well where there is at least 1 full common word to both the strings that are being joined on. For example, if we are joining on "Beakers" vs "Huge Big Beakers" they should join because they have "Beakers" in common....
I have tried modifying my previous query from the other question to account for this based on some links I found here on stackoverflow, I keep getting Syntax Error and it does not really point to where the problem is. Here is my Query (it is only for 1 column, have not copy pasted it to all of them because it still does not work for some reason), I only am showing a few columns because they are repetitive anyways and to make it easier to read:
SELECT DISTINCT Product.Category, Analytics.Unique, Product.ID,
Product.Family
FROM Analytics
INNER JOIN Product ON Analytics.Search = IIF((SELECT DISTINCT
Product.Category
FROM Product, Analytics
WHERE ' ' & Product.Category & ' '
Like '* Product.Category *'), Product.Category,
IIF(Product.Field4 = Analytics.Search, Product.Field4,));
something is wrong in this part that I tried to add because it worked before for the full match per the other question I had:
Product ON Analytics.Search = IIF((SELECT DISTINCT Product.Category FROM
Product, Analytics WHERE ' ' & Product.Category & ' ' Like '*
Product.Category *'),