Hello Mike,
Thank you very much for answering.
I have to admit that I don't understand.
session.query(Mytable).add_column(cast(Mytable.colB,Float) /
cast(Mytable.colC,Float)).all()
gives bad results while
session.execute(SELECT * , CAST(Mytable.colB AS FLOAT) /
CAST(Mytable.colC AS FLOAT)AS
On Jul 2, 2008, at 12:38 PM, Dominique wrote:
Hello Mike,
Thank you very much for answering.
I have to admit that I don't understand.
session.query(Mytable).add_column(cast(Mytable.colB,Float) /
cast(Mytable.colC,Float)).all()
gives bad results while
session.execute(SELECT * ,
Mike,
I just had a quick look. See further in a moment.
Thank you very much for your time, your work and your help.
I really appreciate
Dominique
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
Hi,
Another way to ask the same question:
How can I force SA to take floats into account rather than Numeric ?
Even when columns are declared (in classes or through cast() ) as
floats, SA seems to systematically convert them into Numeric, leading
to the previous question...
I tried making my
the example program you posted is against SQLite. SQLite doesnt have
floats per se, it only has REAL, and a type affinity called
NUMERIC. See http://www.sqlite.org/datatype3.html .So the sqlite
dialect in SA renders NUMERIC for the Float type. If you run it on
postgres, you get: