My goal is to update only more recent records into a table from another 'import' table which gets updated daily...
There is considerable 'overlap' and I want to look at the MAX() value of a date in the table to be updated in order to select the records from the import table to be imported.
I came up with this:
But I get an illegal use of group function error...
What am I doing wrong?
TIA,
-A
There is considerable 'overlap' and I want to look at the MAX() value of a date in the table to be updated in order to select the records from the import table to be imported.
I came up with this:
Code:
SELECT * from ct_adp_load as new
JOIN camp_ct_fsc as existing
WHERE new.deldate > MAX(existing.deldate)
What am I doing wrong?
TIA,
-A