Michael Bayer wrote:
> I tend to use a CASE statement for this:  CASE WHEN x IS NULL THEN 0  
> ELSE x .   We have case() construct for that.

Yes, but that still leaves me with having to code "infinity" some way.

> For your version, use func.coalesce(start, literal_column("timestamp '- 
> infinity'")) .

Thank you. literal_column was exactly what I was looking for.

Though I still would like to have "nulls first/last" as well, this 
construct is also useful when checking date ranges with "between".

Thanks again for your quick and helpful answer, as always...

-- Christoph

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