Rodney wrote:
In Oracle, I can write a query like this:
SELECT ...
FROM ...
WHERE id IN (SELECT f_id FROM f ('param'))
to constrain the returned rows to those that have an id in the set
returned by the table function f.
I would like to generate such a query with sqlalchemy like this:
q
On Nov 5, 1:39 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Rodney wrote:
In Oracle, I can write a query like this:
SELECT ...
FROM ...
WHERE id IN (SELECT f_id FROM f ('param'))
to constrain the returned rows to those that have an id in the set
returned by the table function
I got this to work by defining sq as a select...
sq = sql.expression.select (['*'], from_obj = 'TABLE (f (:p1)).alias
(f1)
q = session.query (...)...filter (id.in_ (sq).params (p1 = 'param')
Rodney
--~--~-~--~~~---~--~~
You received this message because you are