I seem to be having some trouble generating an update statement like this: with baz AS ( select name, coalesce( exists ( select 1 from bar where bar.name=foo.name ), False) AS found_name from foo ), update FOO SET found_name = baz.found_name FROM baz WHERE foo.name = baz.name ;
I first built the select that would go into the CTE, and turned it into a CTE with .cte() Then I built an update, referencing the cte. The query renders in such a way that it *references* the CTE, but never defines it. I can build a *select* query which references (and defines) the CTE, but not an update. -- Jon Software Blacksmith -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.