I am trying to update a boolean field of my Data Extension based on the value of some other field. can I use SQL UPDATE statement to do so? Though when I tried writing this query, it gave me an error

"Incorrect syntax near the keyword 'UPDATE'."

If UPDATE cannot work, is there any other approach by which we can do this?

Something like:

UPDATE [Table1] a
SET a.Field1 = 'True'
WHERE a.Field2 IN ('1','2','3','4')

No, only SELECT statements are allowed.

You can, however, specify Update, Overwrite or Append as the action on the target Data Extension.


| improve this answer | |

No you cannot use UPDATE statements in MC query activities. Please find below link for reference, https://help.marketingcloud.com/en/documentation/exacttarget/interactions/activities/query_activity/query_activity_reference/

Also can you tell the purpose why you need to update data in DE when its already been sync with SFDC data!?

| improve this answer | |
  • Thanks, Adam and Gops! I actually got this query resolved using CASE statement. I wanted to update the boolean fields in a DE with True or False values to use it directly in email template using Ampscript. eg, If a person purchased the product 1{which is a boolean field(Field1) in DE}, I could directly use %%[ IF Field1 == "true" THEN ]%% {content region for product1} – Meenal Agarwal Dec 22 '17 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.