Hi All, not sure why this is not working..
UPDATE
ust
SET
ust.isUnsubscribedFromSystemEmails = 1
FROM
UserSetting AS ust
INNER JOIN
[User] ON ust.userID = [User].userID
AND
[User].emailAddress IN (SELECT emailAddress FROM BadEmailAddresses)
In plain English, I am trying to set the isUnsubscribed
field to unsubscribed where the userID
in the UserSetting
table equals the userID
in the user table and where the emailAddress
in the user table is not in a list of emails from another table. I can run a select on the isUnsubbed column using pretty much the same syntax and it works fine? thanks!
p.s. I've looked at other similar questions here and the syntax appears the same but obviously I'm missing something.