here is the scenario: I have a .CSV bind in a dataTable, I want to move the entire columns in the DT to match the order of my data base's columns.
Once the order is executed, I'll have a Query to insert in the DB.
I thought of looping through my DT and select all row with the same index as the column like so :
Is there a better/quicker way to do it?
PS: I'll use CSV with ~100-5000 rows.
EDIT:
My database columns are like so :
first name, last name, age, Country
and my CSV is ordered like this
age, last name, country, first name
I want the CSV's columns to match the order of the DB's