繁体   English   中英

合并两个大容量数据表

[英]Merging of Two DataTables in Large Volumes

我有一个具有多行重复主键的数据表...

看起来像这样...

----------------------------------------------------
`PrimaryKey CostPrice  SellingPrice   Profit   Address
----------------------------------------------------
101          1000                      100%
101                                             USA
101                      3000
102                                             Africa
102          200         300
102                                    200%
------------------------------------------------------

什么应该是 C# 代码,它将数据合并到 2 个单行中。 我已经研究过网络,但它不是那么相关。 我确信不会有双重数据。 我的意思是对于单列,我们将有一个单元格数据。

是否有可能得到output如下...

----------------------------------------------------
`PrimaryKey  CostPrice   SellingPrice  Profit   Address
------------------------------------------------------
101          1000        3000          100%     USA

102          200         300           200%     Africa
------------------------------------------------------

最好的方法是什么,因为我必须处理用数千条记录填充 DataTable 的 Excel 数据。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM