语句2:
语句2:
DataTables("另表").DataRows.Clear()
Dim dtb As New DataTableBuilder("临时表") '创建一个临时表
dtb.AddDef("姓名", GetType(String),12)
dtb.Build()
Tables("临时表").Visible = False
For Each dc As DataCol In DataTables("表2").DataCols
dim f As New Filler
f.SourceTable = DataTables("表2")
f.SourceCols = dc.Name
f.DataTable = DataTables("临时表")
f.DataCols = "姓名"
f.ExcludeNullValue = True
f.Distinct = False
f.Fill()
Next
dim f1 As New Filler
f1.SourceTable = DataTables("临时表")
f1.SourceCols = "姓名"
f1.DataTable = DataTables("另表")
f1.DataCols = "姓名"
f1.Fill()
DataTables("另表").DataCols("出现次数").Recalc
DataTables.Delete("临时表")