Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Error "Not a group by function"
Kevin_To
OK, I know this should be straight forward but I've been fighting with this query long enough that I need some help...What I'd like to do is return the number of workflows of a given map id grouped by the initiated date so that I can get an idea of how many of these workflows are being starte each day over a given period. Ideally, I'd express this in a bar chart. Here's the query I've got, keep in mind its been a long time since I've used SQL and I was never an expert at it.select count (*) "Request Count", TO_CHAR ( wwork.work_dateinitiated, 'DD' ) , wsubwork.subwork_title from wwork , wsubwork , wmap where wwork.work_workid = wsubwork.subwork_workid and wsubwork.subwork_mapid = wmap.map_mapid and wmap.map_mapobjid = 1550683 and wsubwork.subwork_dateinitiated >= %1 and wsubwork.subwork_dateinitiated <= %2 group by (TO_CHAR ( wwork.work_dateinitiated, 'DD' )) order by (TO_CHAR ( wwork.work_dateinitiated, 'DD' ))I'm getting errors on the "group by" comment.%1 is the start date of the reporting period.%2 is the end date.Any help much appreciated.
Find more posts tagged with
Comments
Lindsay_Davies
Message from Lindsay Davies via eLinkHi,If you use Group By, then the items you select must either be using an"aggregate function" such as count, avg, etc or you must explicitly listthe selected columns in the group by clause.In your case, that means you need to also group bywsubwork.subwork_title.RegardsLindsay-----Original Message-----From: eLink Discussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: 31 July 2006 15:37To: eLink RecipientSubject: Error "Not a group by function"Error "Not a group by function"Posted by To, Kevin on 07/31/2006 10:36 AMOK, I know this should be straight forward but I've been fighting withthis query long enough that I need some help...What I'd like to do isreturn the number of workflows of a given map id grouped by theinitiated date so that I can get an idea of how many of these workflowsare being starte each day over a given period. Ideally, I'd express thisin a bar chart. Here's the query I've got, keep in mind its been a longtime since I've used SQL and I was never an expert at it.select count (*) "Request Count", TO_CHAR ( wwork.work_dateinitiated,'DD' ) , wsubwork.subwork_title from wwork , wsubwork , wmap wherewwork.work_workid = wsubwork.subwork_workid and wsubwork.subwork_mapid =wmap.map_mapid and wmap.map_mapobjid = 1550683 andwsubwork.subwork_dateinitiated >= %1 and wsubwork.subwork_dateinitiated<= %2 group by (TO_CHAR ( wwork.work_dateinitiated, 'DD' )) order by(TO_CHAR ( wwork.work_dateinitiated, 'DD' ))I'm getting errors on the "group by" comment.%1 is the start date of the reporting period.%2 is the end date.Any help much appreciated.[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Livelink LiveReports Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/2249677Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.livereportsdiscussion@elinkkc.opentext.com.
Kevin_To
Thanks so much, worked like a charm!