cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create an alias/synonym for STRING_AGG aggregate function in HANA

bdeboer
Explorer
0 Likes
1,867

I am facing an issue with the aggregate function "STRING_AGG" in CDS, which is not supported in both HANA and SQLite. As a solution I'm currently maintaining two sets of CDS files to handle STRING_AGG / GROUP_CONCAT depending on the database. But this is starting to get diffucult to maintain. I'm hoping there is a better way.

I've tried to creating a custom GROUP_CONCAT.hdbfunction which simply calls STRING_AGG. But it seems these functions can't work as aggregate functions in HANA.

I also tried to create a synonym for STRING_AGG. I'm not sure if it's possible. I cannot seem to find STRING_AGG in the system views.

My next plan would be to create a script that automatically generates the set for HANA. Performing a simple replace GROUP_CONCAT -> STRING_AGG. But this doesn't feel optimal either.

Is there a better solution for handling the "STRING_AGG" aggregate function in CDS for HANA and SQLite without maintaining separate sets of CDS files?

Accepted Solutions (0)

Answers (0)