When creating the queries on the new account I'm getting this error for all of my queries that have the Data Action set as Update:

Error saving the Query field.The Target Data Extension must have at least one primary key field.

The problem is that all of the Data Extensions have one or more primary keys.

Any ideas of why is this happening?

  • 1
    The error suggests that the Data Extension in the a account you're trying to create the Query in does not have a Primary Key defined. Update queries require the target data extension to have a primary key. – Macca Jun 9 '17 at 0:45

Solved! For some reason when doing the query retrieve from the old account it was not returning the correct CustomerKey for these specific DEs(qry.DataExtensionTarget.CustomerKey), so I just added a retrieve for the DE using the name(qry.DataExtensionTarget.Name) and it worked perfectly.

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.