0

I have 2 indentical Data Extensions say table1 & table2. email is the primary key in both these Data extensions

I run below query to update Data extension table2

select * from table1

The query completes successfully without errors but the data from table1 is not updated into table2.

But when I manually write each field from table 1 without using select *, the data is updated correctly

select email,name,age,gender
from table1

Please can anyone help me solve this issue, as I need to use select * and not manually enter all fields due to the use case in the project. Any other way to resolve this ? I do not want to overwrite this table2 as well as i want to retain original row numbers

3
  • 2
    You can drag and drop your source data extension from the left to enter all columns simultaneously. I don't know your use case, but if you try using the select * to avoid updating the query, keep in mind that SFMC caches the source Data Extension column names when you save SQL Query Activity. You will still have to edit and save the activity if new columns are added to your source DE. Sep 27, 2022 at 12:21
  • Thank you for the info about the cache, whcih I did not know before. I will run a SSJS script to update the query so that it does not use the cache and takes the newest fields. thanks again. this solved my problem
    – nami
    Sep 27, 2022 at 13:11
  • Great, no worries. you can accept the answer if it resolved the problem. thanks Sep 27, 2022 at 13:35

1 Answer 1

2

Since it solved the problem, I'll post my comment here:

You can drag and drop your source data extension from the left to enter all columns simultaneously.

I don't know your use case, but if you try using the select * to avoid updating the query, keep in mind that SFMC caches the source Data Extension column names when you save SQL Query Activity. You will still have to edit and save the activity if new columns are added to your source DE

You must log in to answer this question.

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