--
Dim dtb As New DataTableBuilder("表B")
dtb.AddDef("姓名", GetType(String), 32)
For Each v As String In DataTables("表A").GetValues("课程")
dtb.AddDef(v & "_分数", GetType(Double))
dtb.AddDef(v & "_实际分数", GetType(Double))
Next
dtb.Build()
For Each v As String In DataTables("表A").GetValues("姓名","审核=‘未审核’")
Dim dr1 As DataRow = DataTables("表B").AddNew()
dr1("姓名") = v
For Each dr2 As DataRow In DataTables("表A").select("姓名=\'" & v & "\' and 审核=‘未审核’")
dr1(dr2("课程") & "_分数") = dr2("分数")
dr1(dr2("课程") & "_实际") = dr2("实际")
Next
Next
MainTable = Tables("表B")