str: = table1.tableName; Consulta1.close; QUERY1.SQL.CLEAR; Query1.sql.add (formato ('select * from %s', [str])); Consulta1.apor;