0

In sql we can delete all rows like: DELETE FROM table_name how can i do the same in marketing cloud by query for a data extension? I would like to delete all rows from a data extension.

0
List<sobject> g = new List<sobject>([Select id from table_name]);
delete g;

sobject is your object name (make a list of the object)

  • Sorry I am not understanding. How this will work or run? where to put this list? does not look like something that will work in query. – kuml Feb 9 '18 at 12:40
0

I figured it out:

SELECT * FROM [DE_Name] WHERE 1 = 2
  • How does this work?. IIUC this is selecting an empty result set, it's not actually deleting anything from the data extension. – Óscar López Feb 15 at 10:32

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.