From: Ben T. <bt...@gm...> - 2010-12-24 16:56:08
|
On Fri, Dec 24, 2010 at 10:44 AM, Oleg Broytman <ph...@ph...> wrote: > Oops, columns in Select cannot be strings - to allow strings in > queries. > > Use sqlbuilder.Select(sqlbuilder.func.MAX(sqlbuilder.const.serial) > > from sqlobject.sqlbuilder import Select, func, const > Select(func.MAX(const.serial) > > looks better for my eyes. Oleg, once again, thank you. I was looking for the MAX function and was unable to find it. Const is interesting as well, it takes the provided attr and transforms it to verbatim in the resulting SQL, neat. The above works perfectly! |