Hi guys,
I am using MySQL. I want to insert some records in a table provided that they do not exist in another table. So I want to perform something like this:
INSERT INTO sales (name, id)
SELECT name, id FROM sales_h
WHERE name AND id NOT IN (SELECT name, id FROM T_sales);
The problem is that MySQL does not allow this kind of syntax (something to do with the where clause...) I tried using CONCAT but with no result.
Any clue??