This command is a convenient way to add data to an in-memory SQL table, when the data exists as Tcl lists. The command looks up the schema of the table, converts the rows of data to SQL insert statements, and executes them. The return value is the count of rows added to the table.
The command is part of the dmh package and it exists in the ::dmh namespace.
package require dmh dmh_import set reply [SQL "select * from table_A"] set cols [lindex $reply 2] set rows [lindex $reply 6] set count [lindex $reply 4] if { $count > 0 } { set ct [hub_insert A_archive $cols $rows] } else { set ct 0 } if { $ct < $count } { .... }