Code:
INSERT INTO Product_Category_Mapping
(ProductId, CategoryId)
SELECT Product.Id AS ProductId, Category.Id AS CategoryId
FROM Product, Category
WHERE Product.Name LIKE Category.Name
Hello,
I keep coming up with 0 results and can not figure this out. I am trying to find Category.Name in Product.Name and insert the Category.Id along with the Product.Id into the table Product_Category_Mapping. For example the Category.Name could be Chevrolet Cavalier and the Product.Name could be Brake Rotor for 00-05 Chevrolet Cavalier 2.4L. Please let me know if you can help.
Thank you!