StuartBombay
Programmer
Help! I'm so close to creating this simple thing. I need to set a boolean in Table A to true based on a date in Table B.
I get an error "incorrect syntax near WHERE".
I need this figured out last week (when it broke...). Please help! It works if I leave out the date, but I would like to preserve the most recent if I can.
Thanks.
Code:
UPDATE message_recipient
SET is_email_sent = '1'
WHERE EXISTS
(
SELECT * FROM user_message
INNER JOIN message_recipient
ON message_recipient.message_guid = user_message.guid
)
WHERE user_message.date_sent < '8/3/2008'
I need this figured out last week (when it broke...). Please help! It works if I leave out the date, but I would like to preserve the most recent if I can.
Thanks.