[sqlalchemy] Re: how to join tables properly

2008-09-29 Thread Alex K
Hello, Ksenia, This may help: http://www.sqlalchemy.org/docs/05/mappers.html#advdatamapping_relation_strategies_containseager On Sep 29, 2:38 am, Ksenia [EMAIL PROTECTED] wrote: Hi list, I can't figure out a very simple thing. All I want is to do this query: select table1.A, table2.B,

[sqlalchemy] Re: how to join tables properly

2008-09-29 Thread Ksenia
Hi Alex, Thanks a lot for your help! This is exactly what I needed. I almost gave it up before and started to write plain SQL to get the desired results ;) Works like a charm now. In case anyone interested, I am pasting the results below (BTW it's an interface to a (custom) table from Roundup

[sqlalchemy] Re: how to join tables properly

2008-09-29 Thread Michael Bayer
On Sep 28, 2008, at 6:38 PM, Ksenia wrote: Hi list, I can't figure out a very simple thing. All I want is to do this query: select table1.A, table2.B, table3.C from table1, table2, table3 where table1.foreignkey2 = table2.primarykey and table1.foreignkey3 = table3.primarykey; When