On Sat, Jan 19, 2008 at 01:08:38PM +0100, Petr Jake?? wrote: > trying to select ALL rows from the table with the "max" value in a specified > field > I can go: > > tmax=Prodcats.select().max('tStamp') > for row in Prodcats.selectBy('tStamp' == tmax): > print row > > Just wander if there is some other way how to get rows with max (min....) > values in specified field from the table
This is the best you can do. It possible to use HAVING clause (not in .select(), of course, but in sqlbuilder.Select()) or a subquery, but they are more complex solutions. PS. You know now that the syntax of .selectBy() is different. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss