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 Answer 1

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 */
4
  • Thank you very much @Gortonington, i will try this!! Commented May 10, 2019 at 18:56
  • 1
    Hey @Gortonington it works! Thank you! Commented May 12, 2019 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? Commented May 12, 2019 at 4:23
  • Edited my answer to reflect your above request. Commented May 13, 2019 at 12:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.