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 going to want a select() construct for that calling style. if you don't have a Table or mapped class for "sometable", you can make an ad-hoc table using table(): from sqlalchemy.sql import table, column BizObj.col1.in_(select([table("sometable", column("col1")).c.col1])) > > Needing help. > > thanks, > Sanjay > > > --~--~---------~--~----~------------~-------~--~----~ 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 sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---