0

Im trying to update a Data Extension with data from another Data Extension, very simple, you'd think.

The target Data Extension has SubscriberKey as Primary Key and the source Data Extension doesn't have a Primary Key, but I wanted to avoid issues with this by using DISTINCT in the Query. My Query looks like this

SELECT DISTINCT
SubscriberKey, EmailAddress, Language, Country
FROM DataExtension01

I keep get the error Violation of PRIMARY KEY constraint. Cannot insert duplicate key. Shouldn't DISTINCT solve this?

Hoping you can help.

2

1 Answer 1

0

Using DISTICT will return a distinct row, and not a distinct SubscriberKey. If same SK exists in multiple countries, it will appear more than once in the result set. You will need to decide on which record you want to keep and which to discard and apply this logic in a more comprehensive query.

You must log in to answer this question.

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