Hi All,

I have been trying to covert this sql query to sqlalchemy one for
hours now with no luck. any help will be appreciated


"update table1 set columnValue=(case when columnValue=A then B when
columnValue=B then A end) where columnValue in (A,B);"

It is just swapping the  columnValue where its A it set B and where
its B it set A

I tried
query=update([table1.c.columnValue],case([table1.c.columnValue==A, B],
[table1.c.columnValue==B, A]), where(table1.c.columnValue==A or
table1.c.columnValue==B))


???

-- 
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.

Reply via email to