Skip to Content

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

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 11, 2017 at 08:02 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded