order_by(text(“union_date”)) does a trick - thank you!

Cheers,
TSz



Michael Bayer wrote:
>
> I’d probably try to order_by(text(“union_date”)) so that it isn’t 
> interpreted as a column object. 
>
> If that doesn’t work, then the query here should use a simple Core union 
> object, and then a new query 
> session.query(my_union.c.union_date).distinct().order_by(my_union.c.union_date).
>  
>
>
>
>
>
> pide...@gmail.com <javascript:> wrote: 
>
> > Hi, 
> > 
> > I am trying to process UNION results - there is a code, but I think it 
> is better to ready it properly formatted, thus I am attaching url to stack: 
> http://stackoverflow.com/questions/29208591/sqlalchemy-process-union-result 
> > 
> > I would be grateful if you could give me any hints how to deal with it. 
> > 
> > Thanks and cheers, 
> > TSz 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sqlalchemy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sqlalchemy+...@googlegroups.com <javascript:>. 
> > To post to this group, send email to sqlal...@googlegroups.com 
> <javascript:>. 
> > Visit this group at http://groups.google.com/group/sqlalchemy. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to