http://www.foxtable.com/webhelp/topics/0679.htm
Dim dtb As New DataTableBuilder("统计表)
Dim Products As List(Of String) = DataTables("表1").GetValues("日期")
For Each v As String In Products
dtb.AddDef(v, Gettype(string),16)
Next
dtb.Build()
For Each v As String In Products
For Each dr As datarow In DataTables("表2").select("日期='" & v & "'")
Dim dr1 As DataRow = DataTables("统计表").find(v & " is null")
if dr1 is nothing
dr1 = DataTables("统计表").AddNew()
end if
dr1(dr("日期")) = dr("工单")
Next
Next
MainTable = Tables("统计表")