Thomas Drake wrote:
>
> Heyo,
>
> Is there any way to specify a particular ordering on a column with the
> order by clause (or otherwise)? Something like:
>
> session.query(People).order_by(People.name, ['rick', 'james', 'bob',
> 'mike'])

I usually use a CASE expression for this.  somewhat tedious but gets the
job done.   SQLA has the `case()` function that renders CASE.




>
> Thanks,
>
> -thomas
> >
>


--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to