I need to order a table by start and end dates, where null values should 
be interpreted as "prior to all values" for start dates and "later than 
all values" for end dates.

This could be realized with "nulls first", "nulls last", but it seems 
this did not make it into SQLAlchemy yet (ticket #723).

A workaround (for PostgreSQL) would be something like this:

order_by coalesce(start, timestamp '-infinity'),
        coalesce(end_date, timestamp 'infinity')

But I don't find how to construct this with SQLAlchemy. Any ideas? Any 
better solutions?

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