[web2py] Re: create table as select.

2011-01-29 Thread DenesL
To answer your first question I will illustrate it with an example: #models db.define_table('person', Field('name'), Field('age','integer'), format='%(name)s' ) db.define_table('dog', Field('name'), Field('owner','reference person'), format='%(name)s' ) #controller def build_new_tab

[web2py] Re: create table as select.

2011-01-29 Thread vortex
Because I have a controller that presents data for a table. So to present data which is a join of several tables, I would build a table and then use that same controller. Where can I find more information on how to make more complex queries and presenting data with web2py? On Jan 28, 6:27 pm, Den

[web2py] Re: create table as select.

2011-01-28 Thread DenesL
It can be done, but why do you want to do it?. On Jan 28, 10:42 am, vortex wrote: > Is it possible to join to tables and create a new table based on this > join using only DAL? > > CREATE TABLE newtable AS SELECT  ta.key, ta.col1, tb.col2  FROM ta > JOIN tb.col1 on (ta.key=tb.key)