I am trying to create a query that will only append product data if the product number does not currently exist in the master sheet, and only if that non-existing product number also has a product status of some form of "active" or "planning". I'm hitting a roadblock with access and can't make my query work. Currently my query is:
Code:
INSERT INTO [Products] ( [Product Number], [Product Name], [Product Color], [Product Status], [Product Start], [Product Finish], [Company Status], [Product Price] )
SELECT [Master Data].[Product Number], [Master Data].[Product Name], [Master Data].[Product Color], [Master Data].[Product Status], [Master Data].[Product Start], [Master Data].[Product Finish], [Master Data].[Company Status], [Master Data].[Product Price]
FROM [Products] RIGHT JOIN [Master Data] ON [Products].[Product Number] = [Master Data].[Product Number]
WHERE ((([Products].[Product Number]) Is Null));
I've tried adding the criteria for product status, but cannot get any results:
Code:
WHERE ((([Master Data].[Product Status]) Like "*Active*") AND (([Products].[Product Number]) Is Null));
I figure it must be an easy solution to pull only Product Numbers that are null and have a status of "*Active*" or "*Planning*", but I can't find anything online and can't figure out what I'm doing wrong. Any advice would be greatly appreciated!