Just wondering if it's any different if you try the tripe quote syntax
"""...""". For example in a similar case I use
q = """
select
os,
count(os)
from (
select
distinct
s.id,
os
from
server s
join instance_server ins on s.id = ins.server_id
join instance i on ins.instance_servers_id = i.id
join nar n on i.nar_id = n.id
where
upper(n.nar_name) = upper(:app)
and host_type = 'PHYSICAL'
)
group by os
order by os
"""
q = text(q)
conn = session.connection()
rows = conn.execute(q, app=app).fetchall()
with the additional benefit that I can copy the SQL verbatim to an SQL
editor for testing.
-sas
On Aug 30, 7:00 pm, Petr Kobalíček <[email protected]> wrote:
> Hi Michael,
>
> triple escaping works, sorry for misinformation.
>
> Best regards
> Petr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.