1

Extension Update-

I have two data extension Data Extension "A" and Data Extension "B". i want to add the data of Data Extension "B" to Data Extension "A". Now the problem is - In Data Extension "A" there is a field (language) which store "FC" and "EC" value. and the Data Extension "B" the same field ( language) store the value fr-ca and en-ca. While adding the data into the Data Extension "A" and i want to convert the value from fr-ca to FC and en-ca to EC , then want to store into the Data Extension "A". any solution for this? Expert!

1

What you will want to do is a SQL CASE statement to conditionally change the value to insert into the DE based on a value from your source DE.

So it would be:

SELECT Field1,
       Field2,
       Field3,
       CASE
           WHEN Language = "fr-ca" THEN "FC"
           WHEN Language = "en-ca" THEN "EC"
           ELSE "Default value" /* If needed */
       END as Language,
       CASE /* Added based off comment */
           WHEN Language = "fr-ca" THEN "QC"
           ELSE "Default value" /* If needed */
       END as Prov
FROM [yourDE_B]

/* Target: yourDE_A */
/* Action: Update */
  • Thank you very much @Gortonington, i will try this!! – Marketing cloud Geek May 10 '19 at 18:56
  • 1
    Hey @Gortonington it works! Thank you! – Marketing cloud Geek May 12 '19 at 4:21
  • I have another case - I want to change the value of another filed based on the language field. IF Language = fr-ca then set Prov = QC. ( Prov is another field) How I can do this? – Marketing cloud Geek May 12 '19 at 4:23
  • Edited my answer to reflect your above request. – Gortonington May 13 '19 at 12:38

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.