We should really fix the MSSQL dialect to not be throwing a  
SystemError when a SQL statement is not successfully interpreted.

I can't see anything wrong with the statement otherwise unless MSSQL  
has a problem with the same column being in GROUP BY as well as an  
aggregate.  I'd get it to work at the SQL prompt first.

On Oct 10, 2008, at 11:15 AM, Lukasz Szybalski wrote:

>
> Hello,
> Could anybody tell me what is wrong with this select statement?
>
> Records is a mapper.
>
> group 
> = 
> sqlalchemy 
> .select 
> ([Records 
> .TRANS_TYPE 
> ,Records.TR_DATE,func.count(Records.TR_DATE).label('date_count')],
> Records 
> .TRANS_TYPE 
> = 
> = 
> 29 
> ).group_by([Records.TRANS_TYPE,Records.TR_DATE]).execute().fetchall()
>
> I get system error..
>
>
> Ideas?
>
> I can't find a full example that works nowhere on the doc pages.
>
> Thanks,
> Lucas
>
>
> -- 
> Python and OpenOffice documents and templates
> http://lucasmanual.com/mywiki/OpenOffice
> Fast and Easy Backup solution with Bacula
> http://lucasmanual.com/mywiki/Bacula
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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