I thought that a posting/article existed that showed how to do this with dynamic queries but can only find one that does a copy:
DEF VAR tablename as CHAR INITIAL "table1,table2,table3" /* and so on */
DEF VAR cTraverseOldTable AS CHARACTER.
DEF VAR iTableArrayIndex AS INT.
DO iTableArrayIndex...