diff --git a/db-service/lib/cqn2sql.js b/db-service/lib/cqn2sql.js index cdf3b4959..ccb1c68a5 100644 --- a/db-service/lib/cqn2sql.js +++ b/db-service/lib/cqn2sql.js @@ -990,7 +990,7 @@ class CQN2SQLRenderer { } else { cds.error`Invalid arguments provided for function '${func}' (${args})` } - const fn = this.class.Functions[func]?.apply(this.class.Functions, args) || `${func}(${args})` + const fn = this.class.Functions[func]?.apply(this.class.Functions, args) || `${func}${args ? `(${args})`: ''}` if (xpr) return `${fn} ${this.xpr({ xpr })}` return fn }