以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=148710) |
-- 作者:liujun530 -- 发布时间:2020/4/14 2:23:00 -- [求助] 狐表临时表A向另一数据表B添加数据行,都有 Guid列 如果Guid相同,则把A表数据更新到B表的对应列,不同添加数据到对应列,怎么处理哦
|
-- 作者:有点蓝 -- 发布时间:2020/4/14 9:30:00 -- http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=50080 比如 For Each dr1 As DataRow In DataTables("表A").Select("[金额] > 100") Dim dr2 As DataRow = DataTables("表B").find("Guid=\'" & dr1("Guid") & "\'") if dr2 is nothing then dr2 = DataTables("表B").AddNew() end if For Each dc As DataCol in DataTables("表A").DataCols
dr2(dc.Name) = dr1(dc.name) Next Next |