How to call a Hana Calculation View from HDB Procedure
I am implementing a hdb procedure which internally calls a Calculation view by passing a set of parameters.
One of these parameters is a variable .. defined in the procedure itself.
Can someone guide me on how I can call a calculation view (by passing variable parameters) from a hdb procedure.
Any help is highly appreciated.
Florian Pfeffer replied
the syntax in SQLScript is a little bit different than described above (which is for SQL queries).
DECLARE lv_variable nvarchar(10) := 'dummy';
lt_data = SELECT * FROM calculation_view ( PLACEHOLDER."$$PARAMETER_NAME$$ => :lv_variable );
You have to address your parameters with PLACEHOLDER."$$<your parameter name$$".
So your query would look like following:
SELECT distinct "CASE_KEY" FROM "_SYS_BIC"."Deloitte.Innovation.saint.models/CASELISTFILTERS"
PLACEHOLDER."$$EVT_SERIOUS_IND$$" => NULL,
PLACEHOLDER."$$EVT_RELATED_IND$$" => NULL,
PLACEHOLDER."$$FILTERTYPE$$" => 'S',
PLACEHOLDER."$$BASECASEKEY$$ => :basecasekey