On Mar 30, 10:54 am, "Paul Kippes" <[EMAIL PROTECTED]>
wrote:
> I'm trying to create a subselect that has a where condition using an
> identically named column as the outer select.  I'm not able to figure
> out how to tell SQLAlchemy that I need two parameters--one for each
> query.  Here is what my SQL would look like if I wrote it by hand:
>
>     SELECT signals.*
>         FROM module_outputs
>     WHERE module_id = :module_id
>         AND signal_id NOT IN (
>             SELECT signal_id
>                 FROM module_inputs
>                 WHERE module_id = :module_id)

thats an invalid query - the "signals" table is not in the FROM
condition.  also your code below seems to indicate you want the outer
query to join on "module_inputs" but up here you put "module_outputs"
in your  main FROM clause.   construct your SQL query as plain text,
run it and make sure it returns what you want,  then send it back here
if youre still stumped.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to