On Wednesday 17 March 2010 11:34:30 Rotem Tamir wrote:
> Sorry i didn't understand the example
>
> i want to select a distinct list of dates from all of my invoices
>
> why do i need to filter by id=1 or by id<now() ?

You don't, Patricio misunderstood your question.

The answer is something like this (untested)


  from sqlalchemy.sql import *
  DBSession.execute(select([Invoice.date], distinct=True))


It might be that distinct=True is wrong, but instead is a separate call, like


  select([...]).distinct().

Check the SQLAlchemy-docs on this.

Diez

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to