datatable merging
-
Hi, I have a dataset with 4 datatable . tbl1 having 2 coloumns like Col1 & Col2 with 3 rows tbl2 having 2 coloumns like Col1 & Col2 with 2 rows tbl3 having 2 coloumns like Col1 & Col2 with 4 rows tbl1 col1 col2 12 10 15 20 17 23 tbl2 col1 col2 30 31 32 38 tbl3 col1 col2 58 69 41 21 14 45 78 98 So how to merge the 3 tables into a single table, the output like col1 col2 col1 col2 col1 col2 12 10 30 31 58 69 15 20 32 38 41 21 17 23 0 0 14 45 0 0 0 0 78 98 Can you anyone please give me the output...
kannak
-
Hi, I have a dataset with 4 datatable . tbl1 having 2 coloumns like Col1 & Col2 with 3 rows tbl2 having 2 coloumns like Col1 & Col2 with 2 rows tbl3 having 2 coloumns like Col1 & Col2 with 4 rows tbl1 col1 col2 12 10 15 20 17 23 tbl2 col1 col2 30 31 32 38 tbl3 col1 col2 58 69 41 21 14 45 78 98 So how to merge the 3 tables into a single table, the output like col1 col2 col1 col2 col1 col2 12 10 30 31 58 69 15 20 32 38 41 21 17 23 0 0 14 45 0 0 0 0 78 98 Can you anyone please give me the output...
kannak
There is no direct method that you can do. You need to loop through all column of source tables and need to create a new table having new column structure(have all column). Then using some for loop you need to add rows, again by calling source tables rows.
Thanks, Arindam D Tewary