Hi All,
i am not able to use max query in sqlalchemy?
currently i am using this:
r= model.session.query(model.RadReport).max
(model.t_reports.c.reportid)
2009-02-06 20:52:07,453 INFO *Main Thread*
[sqlalchemy.engine.base.Engine.0x..b0:_cursor_execute] SELECT max
(t_reports.reportid) AS max_1
FROM t_reports
2009-02-06 20:52:07,453 INFO *MainThread*
[sqlalchemy.engine.base.Engine.0x..b0:_cursor_execute] []
2009-02-06 20:52:07,453 DEBUG *MainThread*
[sqlalchemy.engine.base.Engine.0x..b0:_init_metadata] Col ('max_1',)
2009-02-06 20:52:07,467 DEBUG *MainThread*
[sqlalchemy.engine.base.Engine.0x..b0:__init__] Row (None,)
I executed the query in Mysql and got the correct value
SELECT max(t_reports.reportid) AS max_1 FROM t_reports
.
please let me know where i have done work!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---