Hi:
Is there an easy way to return a row with a maximum column value in it?
For example:
I have a log records table. This table logs the status of a bunch of
processes that I schedule here. For a given process, I want to get the
latest log record along with the name of the process.
The model looks like this:
class Process(SQLObject):
class sqlmeta:
style = Style(longID=True)
idName = 'processId'
name = UnicodeCol(length=50)
processKey = UnicodeCol(length=4)
description = UnicodeCol()
startAt = TimeCol()
intervalMinutes = IntCol()
gracePeriodMinutes = IntCol()
createdOn = DateCol(default=datetime.now())
class ProcessLog(SQLObject):
class sqlmeta:
style = Style(longID=True)
idName = 'processLogId'
process = ForeignKey('Process', dbName='processId')
started = DateTimeCol()
completed = DateTimeCol()
successful = BoolCol()
executionTime = UnicodeCol(length=50)
comments = UnicodeCol()
I would like to find the best way to gather this info via SQLObject. I
can't seem to find any doc that talks about a MAX columnar function. Is
there a good way to do this?
-Jim
Jim Steil
IT Manager
Quality Liquid Feeds, Inc.
608.935.2345
608.341-9896 cell
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss