I don't know about other databases but in Postgresql one can do a ' SELECT INTO ...' which is described in the documentation as
*SELECT INTO creates a new table and fills it with data computed by a query. The data is not returned to the client, as it is with a normal SELECT. The new table's columns have the names and data types associated with the output columns of the SELECT. * How can I use that in DAL as a model is necessary for a DAL query to act on a table? I know I can use db.executesql on the newly created table, but I want to get the result in to a selectable grid if possible. As I understand it SQLFORM.grid needs a db.query or at least a table to act on. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)