[sqlalchemy] Re: SELECT statement inside in_

2009-03-18 Thread Glauco
Sanjay ha scritto: I got that the obvious way is just writing the string query, i.e. query.filter(col IN SELECT col FROM some_table) something like this: query.filter( col.in_( select([col],...).correlate(None) )) Glauco --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: SELECT statement inside in_

2009-03-18 Thread Michael Bayer
Sanjay wrote: Hi, I want to write something like query.filter(BizObj.col.in_(SELECT col FROM some_table)). Could not find out how to do it. The code on neither the above nor the below worked. query.filter(BizObj.col1.in_(sqlalchemy.sql.text(SELECT col1 FROM sometable))). in_() is

[sqlalchemy] Re: SELECT statement inside in_

2009-03-18 Thread Mike Conley
On Wed, Mar 18, 2009 at 11:00 AM, Michael Bayer mike...@zzzcomputing.comwrote: Sanjay wrote: Hi, I want to write something like query.filter(BizObj.col.in_(SELECT col FROM some_table)). Could not find out how to do it. The code on neither the above nor the below worked.

[sqlalchemy] Re: SELECT statement inside in_

2009-03-18 Thread Michael Bayer
col.in_(select([MyClass.col2])) Mike Conley wrote: On Wed, Mar 18, 2009 at 11:00 AM, Michael Bayer mike...@zzzcomputing.comwrote: Sanjay wrote: Hi, I want to write something like query.filter(BizObj.col.in_(SELECT col FROM some_table)). Could not find out how to do it. The