Append columns from one data table to another data table

DIVIJ

I have multiple data tables(upto 28) in C# and I want to append all their columns in one data table(with data). Example: datatables are: DT1,DT2,DT3 and so on Number of Columns in these respective data tables: N1,N2,N3 and so on Output: One data table DT with total columns N1+N2+N3+... and all the data from the above data tables. Thanks. Edit: My tables have clustered primary keys.

Roman Svitukha
var all = new DataTable();

all.Merge(DT1);
all.Merge(DT2);
all.Merge(DT2);

... better to use in a loop.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Update data in one table from data in another table

Trouble adding data from one table to another

VBA Copying data from one table to another and rearranging columns

Fetch data from one table columns whose names are value of another table

Append data into another table with the same columns but different order

SQL Append Data from One Column to Another in Same Table

Concanate data from one table to another

Append data from one table to another table

How to insert specific columns and rows of data to an existing table from one table to another?

Transfer data from one table to another on insert

Copy Data from one hbase table to another

getting data of 2 columns from one table

Moving data from one mysql table to another

Move data from one MySQL table to another

i need a function to append data from one table to another table

Procedure to insert data from one column into two columns in another table

Select data from one table & then rename the columns based on another table in SQL server

Pull data from one table to another

MySQL add data from one table to another

Copy table data from one database to another

Copy Data from one table to another table

Copy data from one table into another new table where columns are unknown

Take data from one table and store it into another

Insert Data From One Table To Another - MySQL

Add data from one table into another

selecting data from two different columns in one table that point to the same column in another table

Data from one table to select data columns from another table, using r

How to insert the selected data columns from one oracle database table into another oracle database table in real time

Select all data from one table that does not exists in another table given 3 key columns