@NIGEL CAMPBELL Thanks for the link. But I have run out of talent in trying to get CA to use Oracles Linear Regression Functions.
For example, let's say I have a query with [Product Line], [Month] and [Sales].
In Oracle I would write something like REGR_SLOPE( MONTH, SALES) OVER (PARTITION BY PRODUCT_LINE).
In CA I have tried:
aggregate:REGR_SLOPE( [MONTH], [SALES] ) OVER (PARTITION BY [Product Line]).
This fails with an oracle error. ORA-00909: invalid number of arguments. Yet, I know I am supplying the correct arguments, so I must have the CA syntax wrong.
aggregate:REGR_SLOPE( [MONTH], [SALES] ) OVER ( [Product Line]).(as per doc)
fails with invalid token Product Line.
What syntax would I use in CA to reproduce what I can do in Oracle?
Just to test aggregate functionality, I tried a simple
aggregate: sum( [sales]) over( partition by [Product Line] )
and that works. So there must be something about those more complicated REGR functions.
------------------------------
Marc Reed
------------------------------
Original Message:
Sent: Wed March 27, 2024 06:29 PM
From: NIGEL CAMPBELL
Subject: Aggregate: and Linear Regression Functions
ISO-SQL defines functions which may not include a window specification.
Dynamic Query provides both a built-in implementation of the ISO-SQL regression aggregates (non-Windowed), it will push them to vendor's whose product/version supports them re the equivalent form.
Regarding another facet of your question, refer to the docs re construct that has been supported in an expression for many releases.
Using scalar and aggregate functions - IBM Documentation
------------------------------
NIGEL CAMPBELL
------------------------------