Is it possible to use group by function in jdbc SELECT TEMPLATE adapter service

Hi all,

I created a jdbc SELECT TEMPLATE adapter service in which i want to use a group by function.
While i try the below error is displayed.

=====

Could not run ‘Test’
com.wm.pkg.art.error.DetailedServiceException: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service TestPack.adapterServices.jdbc:Test.
[ADA.1.316] Cannot execute the SQL statement "SELECT DISTINCT t1.CREATED_BY,t1.CREATED_BY_ID,SUM(t1.QUANTITY) FROM TBC_ENQ_PRD_DTLS t1 WHERE (t1.STATUS = 1) ". "
(42000/937) ORA-00937: not a single-group group function
"
ORA-00937: not a single-group group function

Is it possible by using SELECT TEMPLATE adapter service or should i use a CUSTOM or DYNAMIC adapter.

Hi Daniel,

as you are selecting with DISTINCT option grouping will not work.

Can you provide a screen shot of the adapter service as well as a sample of the expetced result?

Regards,
Holger

Hi Daniel,
I believe the SQL syntax which you are trying is not correct. You can check this by running the same query from any of the SQL client tools.

Use Custom SQL template for utilizing GROUP BY clause.

Thanks,
Manohara