How can I copy 1 data column from 1 data table to a new datatable. When I try to do it, I get the error Column \'XXX\' already belongs to another DataTable.?
No looping required , Refer this , Hope this should solve your problem...
DataTable dt = new DataTable();
//fill the dt here
DataTable dt2 = new DataTable();
string[] strCols = {"Column Name to copy"};
dt2 = dt.DefaultView.ToTable("newTableName", false, strCols);