Hi , I'm using SA 0.5. query1 = session.query(literal_column("'Phrase'").label('type')).filter(...) query2 = session.query(literal_column("'Exact'").label('type')).filter(...)
and then : query1.union(query2) gives me : SELECT* 'Phrase' as type* FROM (SELECT 'Phrase' as type FROM table1 WHERE .... UNION SELECT 'Exact' as type FROM table1 WHERE .... ) AS anon_1 But I need : SELECT *type* FROM ( SELECT 'Phrase' AS type FROM table1 WHERE ... UNION SELECT 'Exact' AS type FROM table1 WHERE... ) AS anon_1 Any ideas how I can fix the outer select? Thanks ! -- 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/-/K4EEBKA4WvAJ. 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.