Sometimes, when running a query in Salesforce Marketing Cloud (SFMC), you might notice that Query Studio returns more records compared to DESelect. This can be confusing, especially if you expect the same result from both solutions.
The Reason:
Query Studio and DESelect Segment handle primary keys differently:
-
Query Studio: Creates a DE without automatically setting primary keys, so duplicate records are included.
-
DESelect Segment: Uses the primary key defined in your DE and automatically removes duplicate records.
How to Fix It:
-
Edit your DE in DESelect Segment, remove the primary field (eg. Contact_Key), and click Save.
-
Re-add the primary field (eg. Contact_Key) without setting it as a primary key.
-
Make the field nullable.
-
Run your query again.
Now, both Query Studio and DESelect Segment should give you the same result with duplicate records.
Comments
0 comments
Please sign in to leave a comment.