Hi,

I couldn't find any mention of this in the docs or by googling...

I'm using SelectResults to build somewhat complex queries that have a  
string of joins. It seems that order_by doesn't work in this  
situation. Postgres says:

ERROR:  column "people.name_last" must appear in the GROUP BY clause  
or be used in an aggregate function

Any ideas or a quick example of adding a group_by to a SelectResults?  
According to some discussion in the Postgres docs, adding DISTINCT  
might allow ORDER_BY to work (don't see a way to do that either).  
Either way is fine w/me. :)

(I would have just given up and used another method, but I'm using  
the @paginate decorator in TurboGears, which currently requires  
SelectResults)

Thanks.
--i


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to