Sounds like you might want to set a different collation? I don't know if sql server lets you do that per column, per table, or just per database.
http://msdn.microsoft.com/en-us/library/ms144250.aspx <--- some collation examples On Jul 14, 4:51 am, Massi <massi_...@msn.com> wrote: > Hi everyone, I'm using sqlalchemy 0.6.8 to interact with an sql server > database via pyodbc. I'm getting in troubles using the 'order by' > clause on a varchar column which include positive or negative integer > values. When I try to get values from this column ordered in ascending > mode I get: > > 1 > -1 > 11 > -11 > 111 > > and so on...while I expect the resutl to be something like: > > -1 > -11 > 1 > 11 > 111 > > or even better: > > -11 > -1 > 1 > 11 > 111 > > Is there any way to achieve (or at least workaround) that with > SQLalchemy? > Thanks in advance! -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.