以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]合并时如何去重?请教大家一下?谢谢  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132846)

--  作者:sunion
--  发布时间:2019/3/31 14:48:00
--  [求助]合并时如何去重?请教大家一下?谢谢
合并时如何去重?请教大家一下?谢谢
Dim s1 As List(of String) = DataTables("学生互评表").SQLGetValues("标签一","[学号] = \'" & xuehao.text & "\' And [姓名] = \'" & name.text & "\' And [学年] = \'" & xuen.value & "\'","操作时间") 
Dim s2 As List(of String) = DataTables("学生互评表").SQLGetValues("标签二","[学号] = \'" & xuehao.text & "\' And [姓名] = \'" & name.text & "\' And [学年] = \'" & xuen.value & "\'","操作时间")
s1.AddRange(s2)

[此贴子已经被作者于2019/3/31 15:08:32编辑过]

--  作者:有点甜
--  发布时间:2019/4/1 11:06:00
--  
Dim s1 As List(of String) = DataTables("学生互评表").SQLGetValues("标签一","[学号] = \'" & xuehao.text & "\' And [姓名] = \'" & name.text & "\' And [学年] = \'" & xuen.value & "\'","操作时间")
Dim s2 As List(of String) = DataTables("学生互评表").SQLGetValues("标签二","[学号] = \'" & xuehao.text & "\' And [姓名] = \'" & name.text & "\' And [学年] = \'" & xuen.value & "\'","操作时间")
For Each s As String In s2
    If s1.Contains(s) = False Then
        s1.Add(s)
    End If
Next