on 12-10-2014 5:35 PM
Hello,
It is not possible to use dynamic sql inside READ ONLY procedures in hana to avoid side effects.
But nothing is proposed when the dynamic statement is guaranteed to be a single select statement.
I'm aware of APPLY_FILTER but unfortunalty it doesn't support subqueries or joins...
And I would like to filter on values currently in the system, either with IN..SELECT predicate or using joins
Exemple:
SELECT ACCOUNT,CATEGORY,
FROM FACT_TABLE
WHERE ACCOUNT IN (select ID from <SESSION_USER_DEPENDANT_VIEW>)
The above IN predicate can be replace by an inner join :
SELECT ACCOUNT,CATEGORY,
FROM FACT_TABLE T, <SESSION_USER_DEPENDANT_VIEW> V
WHERE T.ACCOUNT = V.ID;
Im quite stuck
Is their any workarounds possible, using calculation engine functions or something else??
Thank you.
Hi Alexandre,
Is an option to you use one single table to hold data from all users, maybe isolated by session id?
Another possibility is to you create another procedure spliting the logic between than and leting the dynamic code outside the main procedure where should receive the data as IN parameter.
Give more details about this <SESSION_USER_DEPENDANT_VIEW>. What is the goal of it?
Regards, Fernando Da Rós
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.