0

I am newbie in SQL, but i have to populate one data extension (name = TEST A) from another data extension (name = TEST B).

The fields in 'TEST B' has name like: 1. Name 2. State 3. Email Address 4. Id.account

The fields in 'TEST A' has name like:

  1. Name
  2. State
  3. Email Address
  4. Subscriber Key

I want to populate the DE 'TEST A' according the exactly name in common. And the records in 'ID.accout' (field in 'Test B') goes to field 'Subscriber Key' (in TEST A').

Someone could help me with this?

1 Answer 1

1

If you mean you want to fill in TEST A 'Subscriber Key' field with the info from 'TEST B' 'ID.account' field, then the following will do it for you:

SELECT Name
       , State
       , [Email Address]
       , [ID.account] as [Subscriber Key]
FROM [TEST B]

/* Target DE: TEST A */

Judging from comments - If you want to include ID.account in the query as well, just include , [ID.account] before the FROMand add the ID.account field to TEST A DE.

5
  • So thanks, Gortonington!!! One more question: can i duplicate the records that has, for example, the 'name' field. The records 'Test B' appears in 'Test A' fill in collumn 'name' and other field? Oct 18, 2018 at 18:36
  • Sorry not sure I get what you mean by that. Oct 18, 2018 at 18:43
  • so you are saying you want to compare data in A and B and only fill in the data from A if it matches in existing data in B? Oct 18, 2018 at 18:55
  • If i can fill the record in two collumns inside Target Data Extension like example above: The fields in 'TEST B' has name like: 1. Name 2. State 3. Email Address 4. Id.account The fields in 'TEST A' has name like: 1. Name 2. State 3. Email Address 4. Subscriber Key 5. ID.account Can i fill the 'ID.account' and 'Subscriber Key' in 'Test A' like the same records? In the case is 'Id.account' from 'Test B' Oct 18, 2018 at 18:57
  • updated answer to reflect your comments Oct 18, 2018 at 20:10

You must log in to answer this question.

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