Hi everybody, I've banging my head against this for hours ... maybe someone can help?
For a mapped class called 'Person' I'm trying to do something like: query(Person).filter(Person.status_id.in_('select status_id from myschema.mytable where statusname=:n1', n1='hired')) Obviously this does not work but shows what I want to do. There is no mapping or SA table available for 'myschema.mytable' and I cannot provide one. So I have to apply raw SQL in the subselect, and I need a binding variable. Can anyone help how to wrap the raw SQL into something that works in the 'in_'-clause? Any help would be very much appreciated. Thanks, Ralph -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/iMQWfRnwrOAJ. 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.