i'm not sure if i understand what u want, but u can do nested join( 
prev_join, table_next). Also see the full spec of select( 
columns_list, whereclause, from_obj_list, order_by, group_by, ....)

something like 

table_a.join(table_b).join(c).join(d).select([<columns_here>])

for the implicit version of join, may do the job if there is only one 
obvious relation from table to table. If not, u have to specify 
onclauses on each join and use the explicit join(t1,t2,onclause).

Maybe give some better example (at last 3 tables/columns)?



> Hi,
> I've trying to solve the following problem. I've given a list of
> tables and list of columns to look at.
> All tables are auto-loaded from DB. So, I don't know a priory (I
> don't want to know) the relationships and table schema. Now, how to
> build a general join among tables and retrieve only the list of
> given columns names. As an example, there is an explicit join call
> and I can do
>
> join(tableObj1, tableObj2).select()
>
> but selection will be done for all columns and as of my
> understanding join can do only 2 tables.
>
> Can it be generalized to a list of tables and can selection be done
> only on given column names?
>
> Thanks,
> Valentin.
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to