Foxtable(狐表)用户栏目专家坐堂 → 将同一列的数据复制到另外一个表不同的列,如何串联。


  共有10149人关注过本帖平板打印复制链接

主题:将同一列的数据复制到另外一个表不同的列,如何串联。

帅哥哟,离线,有人找我吗?
huanghpp
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:10 积分:137 威望:0 精华:0 注册:2012/1/19 9:27:00
将同一列的数据复制到另外一个表不同的列,如何串联。  发帖心情 Post By:2012/1/30 11:04:00 [只看该作者]

将同一列的数据复制到另外一个表不同的列,如何串联。

代码如下:

Select Case e.DataCol.Name
    Case "C11"
    Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And G = " & "'" & e.DataRow("C4") & "'" )
    If dr IsNot Nothing'如果找到,则设置各列内容
       dr("O")=e.DataRow("C11")
       dr("P")=e.DataRow("C12")
    End If
    Case "C11"
    Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And W = " & "'" & e.DataRow("C4") & "'" )
    If dr IsNot Nothing'如果找到,则设置各列内容
       dr("A1")=e.DataRow("C11")
       dr("B1")=e.DataRow("C12")
    End If
    Case "C11"
    Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And C1 = " & "'" & e.DataRow("C4") & "'" )
    If dr IsNot Nothing'如果找到,则设置各列内容
       dr("G1")=e.DataRow("C11")
       dr("H1")=e.DataRow("C12")
    End If
    Case "C11"
    Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And I1 = " & "'" & e.DataRow("C4") & "'" )
    If dr IsNot Nothing'如果找到,则设置各列内容
       dr("M1")=e.DataRow("C11")
       dr("N1")=e.DataRow("C12")
    End If
End Select


 回到顶部