I need your help. How can we copy a particular column from one data table to another data table?
Let’s assume that we have 2 data tables with names DT1 and DT2. I have to copy a column with the name say “Location” from DT1 to the column by the name “Area” in DT2. Can anyone help me with the same.
You can use for each row activity to update the value in the another datatable.
In DT2 you have only one column-Area?
Nope ! That’s the one leading to this confusion. I have multiple columns in DT2 as well. So, is there any option to copy one specific column from DT1 to another specific column in Dt2.
Thanks & Regards,
you can get the particular column alone to another data table using below code.
so you can move the particular column alone in another data table.
if suppose Dt2 already having some data you need add newly use for each data row to update the area column values.
So, you’re asking me to copy that particular column in DT 1 to a new data table. Later, copy that new data table to that particular column in DT2 right?
I thought of the same thing. I will try that and will let you know.
Is there any other simple solution ?
Thanks & Regards,
how to copy particular column of data to another datatable of particular column name?
Did Anyone find out a way to do this?
I have a similar scenario where you need to copy a particular column values from a data table to another column name in another data table.
Is there any specific condition to add the data from the another table?
Thank you Pradeep.
Here is the detailed scenario.
I would like to copy and paste values from one column of a data table to another column of another data table. Please have a look at the below Screenshot.
I would like to copy all the columns values from first table and paste it to the new Datatable (shown below).
For example : Name to Full name , Address to Area and Country to Country/City
I have taken column by column approach. please advise if its the best practice.
Note: The second data table is empty
Please look at the scenario in my comment
Use for each row activity and append the value into another table.
dt2(Full Name, Gender,Area,Salary,Country)
For each row (dt1)
add data row activity
DataTable : dt2
Thank you so much. Works perfectly fine.