cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass a input parameter from a table function to a Calculation View

Former Member
0 Kudos

How can I pass an input parameter from a table function to a Calculation view?

Generated SQL via HANA Studio shows that even integers are surrounded by quotes:

SELECT pos.*
FROM "_SYS_BIC"."package/POS_AND_JOBS"('PLACEHOLDER' = ('$$NUMBER_OF_CUBES$$', '10')) pos

But how to pass a parameter from a table function?

FUNCTION "SCHEMA"."package::JoinSegmentAndPorfolio" ( numberOfCubes tinyint ) 
RETURNS table (
"JobId" varchar(36)
)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER AS
BEGIN
return
SELECT "JobId"
FROM "_SYS_BIC"."package/POS_AND_JOBS"('PLACEHOLDER' = ('$NUMBER_OF_CUBES$', '':numberOfCubes'')) pos;
END;

I tried it with one, two and three single quotes but non of it is working.

So how do I pass an input parameter from a table function to a graphical calculation view?

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

For me it worked always fine using the following syntax:

...
SELECT "JobId"
FROM ... ( PLACEHOLDER."$$NUMBER_OF_CUBE$$" => :numberOfCubes )

Regards,
Florian

PS:
As nearly all customers do not wanna see coding or namespaces of them in an open forum, I would anonymize the procedure name and the namespace.

Former Member
0 Kudos

Thx for the solution. Where did you get the syntax from?

Answers (0)