How to store values in for each loop?

I’m executing sql query inside for each loop and want to save the output. It’s saving the output, but only the last one, but i want to save all the output every time loop executes.

Create datatable variables outside of for each scope and Marge the datatable that comes from SQL query with variable that you declares outside of for each

1 Like