I am trying to run a sql query in Automation studio MC for syncing my Sync DE( Contact_salesforce) to a local DE. I want to send email to tht=at local DE in the next automation. But I am facing issue in running this query as it doesnt create records in the local DE. in Local DE ( name of local DE = Another1) I have selected Contactkey as a primary key. and my query runs like this

, s._Contactkey as [Subscriber Key]
, s.AccountId, Contactkey
FROM Contact_Salesforce s
INNER JOIN Another1 m on (s._Contactkey = m.Contactkey)

My data action 'update' as I will be running this query whenever vales change in Sync DE Contact_Salesforce. I am not getting any validations as all fields are mentioned. But when I run it no records gets populated in the Local DE. What am I missing?

1 Answer 1


Get rid of the Inner Join in your query - it's not needed to update data.

If you leave it there the logic would not be something like insert and update all data from the Sync DE to Another1, but more akin to update data on records that exist in both data extensions.

If the Another1 DE will be empty, there will nothing to match against and no data will be written to this DE.

Read more about inner joins here.

  • But initially I want to create records in that from Sync DE and then want to put it on update. So do I need to map my local DE contact key with subscriber key? Commented Jul 2, 2020 at 11:30
  • The update setting does both insert new rows and update existing ones, you don't need to switch the setting at any point. SubscriberKey mapping does not influence the results of your query in any way. If your target DE (Another1) is empty and you will use Inner Join, you will never get results. Either delete this join altogether or switch it to a LEFT JOIN. Commented Jul 2, 2020 at 12:11

You must log in to answer this question.

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