1

I am writing a bunch of queries to update All Subscribers list, and was surprised to see that when I put the condition xxx != yyy it only works if there are values in both columns. I was hoping that it would also return records if column xxx was empty. So now, I also included the following condition: OR xxx IS NULL. Is this the correct way to handle this?

SELECT ...
WHERE allsubs.Column1 != salesforcedata.Column1
OR allsubs.Column1 IS NULL
2
  • Just to confirm, you want to use salesforcedata.Column1 to be the source of the data when the allsubs.Column1 is either different from SF data or null, right? May 21, 2019 at 8:27
  • Yes, that's right.
    – zuzannamj
    May 21, 2019 at 8:30

1 Answer 1

1

Yes, your code is correct. Quick tests would confirm that if you just made two data extensions with mock data.

Depending what you are trying to achieve you might to also consider a case when the salesforcedata.Column1 is null. For example when the customer wants to remove his address from your database (for GDPR compliance).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .