Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CDS view group by fields

Rashmits
Explorer
0 Kudos
2,927

Hi There,

Should the number of columns/fields be same in select and 'group by' for a CDS view, getting below error when grouping by required fields. Trying to get the unique record based on STLNR and IDNRK from STPO table.

3 REPLIES 3

junwu
Active Contributor
0 Kudos
2,628

yes, I think that is basic sql syntax

0 Kudos
2,628

If i have multiple joins/associations with too many columns, all of them have to be in group by clause?! even the text field?

junwu
Active Contributor
0 Kudos
2,628

you can just try, the compiler will tell u.

and yes, all needs to be there or you have to use aggregation function for those fields not presented in group by