0

I am trying to take my information from a Data Extension which contains new customer emails and put them in another Data Extension which severs as our companies master list.

I am able to populate the Temp Id on the New_Customer_Signup however when I try to update the RMWL_Master_Email_List (the activity that this query that drops the data into I get this error message, "Query failed during execution.

Error: Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object 'RMWL Master Email List'. The duplicate key value is (Temp Id)

I checked to make sure that the Temp Id didn't already exist in our Master List and it does not. Any ideas?

select 
'Temp ID' as 'Subscriber Key',
'Email Address' as 'Email',
'First Name' as 'First Name',
'Last Name' as 'Last Name',
'Date Added' as 'Date Added'
from New_Customer_Signup

1 Answer 1

4

Your syntax is inserting literal strings into each column.

Also no need to alias columns if you're not changing the name.

Give this a try:

select 
  [Temp ID] as 'Subscriber Key'
, [Email Address] as 'Email'
, [First Name]
. [Last Name]
, [Date Added]
from New_Customer_Signup
1
  • Thank you so much Adam this worked perfectly. I appreciate your time!
    – Cameron K
    Commented Dec 10, 2018 at 21:06

You must log in to answer this question.

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