Hello Group, some days ago i tried to build a query like
select sum(provision), verkauf_id, gebucht, rl_id from tda_verkauf group by verkauf_id, gebucht, rl_id with sqlobject and sqlbuilder. Select([Verkauf.q.verkaufID, Verkauf.q.rlID, Verkauf.q.gebucht, func.sum(Verkauf.q.provision)], groupBy=[Verkauf.q.verkaufID, Verkauf.q.rlID, Verkauf.q.gebucht]) it looks quite similar to what i wanted except that it contained a vast number of brackets around everything and especially the groupBy statement. SELECT tda_verkauf.verkauf_id, tda_verkauf.rl_id, tda_verkauf.gebucht, sum(tda_verkauf.provision) FROM tda_verkauf GROUP BY (tda_verkauf.verkauf_id, tda_verkauf.rl_id, tda_verkauf.gebucht) which in the end resulted in a not working statement (mysql). i then removed the sqlobject statement and just hardcoded the above which is just not as nice as keeping it dynamic with sqlobject... how to fix that one? Regards, Frank ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss