On Aug 3, 2010, at 2:56 PM, Bryan wrote: > This returns a Decimal type for c2, which is what I want: > c1 = literal(5, type_=Numeric) > c2 = func.sum(c1, type_=Numeric) > > This returns a Float type for c2, but I'm telling c1 that it is a > Numeric. How can I get a decimal returned when using an if function? > c1 = func.if_(Table.foo != None, Table.foo, Table.bar, type_=Numeric) > c2 = func.sum(c1, type_=Numeric)
I see nothing wrong with that code. Can I get some SQLA version / database backend / DBAPI details ? > > -- > 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. > -- 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.
