Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

correct use of input parameter in calc view

$
0
0

Hi,

 

I created a script-based calc view USERS_CALC with input parameter as following.

/********* Begin Procedure Script ************/

BEGIN

    DECLARE session_user_var VARCHAR(256) := '$$userId$$';

    all_users = CE_COLUMN_TABLE("USER_TABLE", ["ID", "NAME", "UUID", "TYPE", "USER_ID"]);

    

    var_out = CE_PROJECTION(:all_users, ["ID" AS "Id",

                                          "NAME" AS "Name",

                                          "UUID" AS "Uuid",

                                          "TYPE" AS "Type",

                                          "USER_ID" AS "UserId",

                                          CE_CALC('"UserId"='':session_user_var''', TINYINT) AS "IsMe"]);

END /********* End Procedure Script ************/

It seems the input parameter doesn't take effect when I call the calc view "select *from"_SYS_BIC"."test.calc/USERS_CALC"(placeholder."$$userId$$"=>'b')". No matter what value I pass to the view, the result of CE_CALC is always 0 even though there should be a match that results 1.

 

Is there anything wrong with my calc view? Your help is appreciated.

 

Thanks,

Michael


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>