[sqlalchemy] SELECT DISTINCT at the ORM level

2008-07-21 Thread jrpfinch
Hi What is the most elegant way of performing a SELECT DISTINCT on a single column at the ORM level on SQLAlchemy 0.4.6? It looks like you can do q=session.query(Order.support_manager).distinct() in the beta version. This is not supported in 0.4.6 though. Thanks in advance Best regards Jon

[sqlalchemy] Re: SystemError: 'finally' pops bad exception with MS SQL Server

2008-07-21 Thread jrpfinch
Yes it appears to be a pyodbc problem, which is a shame because it's making debugging my project incredibly difficult (and I've had even more problems with the other MS SQL libraries like pymssql). The bug report is here:

[sqlalchemy] Re: SystemError: 'finally' pops bad exception with MS SQL Server

2008-07-21 Thread jrpfinch
Done - I really hope we can get this fixed because sqlalchemy and TurboGears is incredibly difficult to use with MS SQL Server at the moment. I think I may be able to improve sqlalchemy if I can get the errors propogating properly Cheers Jon

[sqlalchemy] Newbie question

2008-07-04 Thread jrpfinch
I have just started using Python and TurboGears with SQLAlchemy and I think its great so far. I am working with an already-created database and am wondering what the best way is to represent the relationships between the recurring_task and employee_status table: employee_statuses =

[sqlalchemy] Re: Newbie question

2008-07-04 Thread jrpfinch
On 4 Jul, 18:03, jrpfinch [EMAIL PROTECTED] wrote: I have just started using Python and TurboGears with SQLAlchemy and I think its great so far. I am working with an already-created database and am wondering what the best way is to represent the relationships between the recurring_task