Yeah, it's ok, I was able to knock this up reasonably quickly to be fair, and I totally understand the point about other priorities, it's just I guess I expected to find that function. But no matter, can definitely live with it. def copy_table(old_table, new_table): fld_names = [] properties = db.GetProperties(old_table) with db.Search(old_table) as tbl: schema = tbl.GetSchema() fields = schema.Fields for fld in fields: fld_names.append(fld.Name) sequence = tbl.SearchAll(Array[str](fld_names)) new_tbl = db.Insert(new_table,"Table", schema) db.SetProperties(new_tbl, properties) with db.Search(new_tbl) as tbl2: tbl2.InsertBatch(sequence)
|