This is a more general DB query, but I've learned to trust the web2py 
community, and web2py is where the answer will do me the most good.

I'm looking at a table where I want to have a custom ordering on a field.  
Standard ascending and descending don't quite work for me in the use I'm 
interested in.  What I want to do is sort the field ("owner") so that the 
value I'm most interested in is at the top ("owner='dave'"), and the rest 
of the entries are sorted asc or desc.  Is there a way to do that in a 
single query, or do I need to make 2 queries and concatenate the results?  
Is "group by" an appropriate SQL clause here?

Also, would that solution generalize to sorting by a set of values of 
interest at the top ("owner='dave'|'bob'|'andy'")?

Thanks.

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to