In the documentation I found 

"Note that "from" objects are automatically located within the columns
and whereclause ClauseElements"

for the select() statement.

It is precisely the thing I do not want to.. no way to disable it .. ?

Thanks,
Julien


On Fri, 2008-03-28 at 09:30 -0400, Michael Bayer wrote:
> 
> On Mar 28, 2008, at 8:06 AM, Julien wrote:
> 
> >
> >            ##### Problem is here #####
> >            func.count(
> >                select(
> >                    [sp.c.id],
> >                    sp.c.site_id.in_(
> >                        select(
> >                            [model.t_sites.c.id],
> >                            and_(
> >                                model.t_sites.c.latitude != None,
> >                                model.t_sites.c.longitude != None,
> >                            )
> >                        )
> >                    )
> >                )
> >            ).label('specimen_filtered_georeferenced'),
> >            ##############################
> >
> 
> 
> I think you want to convert the select to a scalar, i.e.  
> count(myselect.as_scalar()).
> 
> 
> > 
-- 
Julien Cigar
Belgian Biodiversity Platform
http://www.biodiversity.be
Université Libre de Bruxelles (ULB)
Campus de la Plaine CP 257
Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entrée ULB 2
B-1050 Bruxelles
Mail: [EMAIL PROTECTED]
@biobel: http://biobel.biodiversity.be/person/show/471
Tel : 02 650 57 52


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