cancel
Showing results for 
Search instead for 
Did you mean: 

In CDS view How merge multiple row line data into single line?

former_member231869
Participant
0 Kudos

Hi ,

Please see the attachment screen shot.

gasparerdelyi
Active Participant
View Entire Topic
ThorstenHoefer
Active Contributor
0 Kudos

Hi panther.williams,

if you have only one value for each key, you can use the max aggregation. In open sql, it's works also for characteristic fileds. But keep in mind, what's happens if you have two values for the key material and batch? In these case, you will ignore the lower value.

select
  a~material
, a~batch
, max( b~value_1 ) as value_1
, max( b~value_2 ) as value_2
from
 table a
  left outer join on b
  where b~material = a~material
    and b~batch = a~batch
    group by a~material, a~batch
<br>