I'm doing a query and would like to order the results in alphabetical
order.  However, the column used is mixed case, so the results have
all lower-case strings before the upper-case variables.

In SQL, I would fix this by using the lower() function such as:

TABLE data (
strName TEXT() NOT NULL
);

SELECT * FROM data ORDER BY LOWER(strName) ASC;

How can I do this with SQLAlchemy?

# How do I apply the lower(field) function to the strName column?
rows = model.data.query().order_by(strName).all()

Thanks,

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