Hello, I'm tryin to set up a small SAPDB-driven web site, however I'm having problems with GROUP BY syntax. I would like to fetch some articles, their authors and number of comments attached to each article. I used MySQL syntax where simply using c.id (query is bellow) as a group column would do. However, that would not work with SAPDB as SAPDB insists on specifying ALL selected columns as group columns, what's more, in this case it does not work because of 'Too many order columns'. I would be grateful if someone could point me to the right way of doing this!
Thanks, Andris Spruds SELECT ar.id, count(c.id) as cmnts, ar.author author_id, ar.category category_id, ar.updated, ar.title, ar.synopsis, u.name || ' ' || u.surname author_name, u.email author_email,u.username author_username FROM ar_articles ar, users u, ar_comments c WHERE usr.id=ar.author AND c.article_id = ar.id GROUP BY c.id _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
