Hello,

I'm trying to delete distinct rows from a DB table.
I have 2 tables in my DB: data_Load and data_Keep. I load data in data_Load, perform several checks and transformations to it, then want to copy it to data_Keep. When some data_Load records have similar combination customer/period/category, I want to overwrite old data by new ones, assuming it is a correction. I therefore want to delete from table data_Keep any record on my 3 keys that would have a similar record in data_Load, then move all my data_Load content into data_Keep.

In my old Access DB, I had a SQL query like this:
Code:
DELETE DISTINCTROW [data_Keep].*
FROM data_Temp INNER JOIN data_Keep ON ([data_Temp].Category = [data_Keep].Category) AND ([data_Temp].Period = [data_Keep].Period AND ([data_Temp].Customer = [data_Keep].Customer);
Moving now to a MySQL DB with Spoon to manage my transformations, I can't get it to work (SQL error), and haven't found so far the ready-to-use step to achieve similar purpose.

So I turn to the Community: any recommendation??

Thanks a lot!
David.