i'm looking for a way to delete records in table 1 with matching combinations in table 2 on 'stn' and 'jaar'. The contents of column 'jaar' in table2 is formatted in a previous stage/query by
year(datum) AS 'jaar'
Sorry, can't find again the site where i found this "solution".
DELETE FROM table1
WHERE stn, year(datum) IN (SELECT stn, jaar FROM table2);