Kindly help me on this.
I am trying to load a calculation view into a table.
select LOC INTO L_LOC FROM (SELECT LOGSYS, STRING_AGG(CONCAT(CONCAT('''''',"STORT"),''''''),',') AS LOC
from (SELECT DISTINCT LOGSYS, STORT FROM "SIE_BDP"."SIE_BDP_PMLOC" WHERE LOGSYS = L_LOGSYS) GROUP BY LOGSYS);
I am storing the loc column into a stored variable L_LOC.
When I try to set the parameters of the calculation view and the run the procedure, it gives me a column store error.
The highlighted part throws the error. Could you please tell me how to assign a stored variable using place holder or if anything is wrong with the string_agg function.
SELECT GJAHR, MONAT, ORGUNIT, COMMODITY, ARENR, HWAER, LSART, MFESN, HERKL
PLACEHOLDER."$$BIP_MONAT1$$" => :L_MONAT1,
PLACEHOLDER."$$BIP_MONAT2$$" => :L_MONAT2,
PLACEHOLDER."$$BIP_LOC$$" => :L_LOC, (this part does not work)
PLACEHOLDER."$$BIP_GJAHRMWPV$$" => '''2016'',''2015''',
PLACEHOLDER."$$BIP_APPCONS$$" => 'NO') ;