I'm trying to do an UPDATE
from a SELECT
following the format given by this SO thread
It's not working. I'm wondering if it's because I need a different UPDATE...SELECT structure when performing calculations.
I've tried various versions of the following:
UPDATE tbl_usertime uat
SET uat.delay_qual = (TIMESTAMPDIFF(MINUTE, uat.view_date, '2011-10-11 15:22:25') > adt.delay),
freq_qual = (adt.frequency > uat.imps_today)
FROM tbl_timing adt
JOIN tbl_usertime uat
ON uat.ad_id = adt.ad_id;
...but it returns 'error in SQL syntax...near 'FROM tbl_timing adt JOIN tbl_usertime uat'
Any ideas? Thanks!