Dim dtb As New DataTableBuilder("标签表")
dtb.AddDef("箱号", Gettype(String), 50)
dtb.AddDef("起始档号", Gettype(String), 50)
dtb.AddDef("终止档号", Gettype(String), 50)
dtb.Build()
For Each nm As String In DataTables("表A").GetUniqueValues("","存放地点")
Dim min As String = DataTables("表A").Compute("min(档号)","存放地点 = '" & nm & "'")
Dim max As String = DataTables("表A").Compute("Max(档号)","存放地点 = '" & nm & "'")
Dim dr As DataRow = DataTables("标签表").AddNew()
dr("箱号") = nm
dr("起始档号") = min
dr("终止档号") = max
Next