on 03-16-2016 10:34 AM
Hi,
I have a simple procedure calculating Last Year Current Month(LYCM) - NVARCHAR(6) based on an input parameter(having Current Month This Year- an user selection).
How can I bind the value returned by this procedure to a second input parameter of NVARCHAR(6) derived from this procedure?
I am on HANA SP10
Thanks in Advance,
Prasad
What is your exact goal here? You wanna pass the value returned by the first procedure to a parameter of another procedure? In which area are you going to do this (SQLScript, XSJS, ...)? In all cases you have to use an intermediate variable, because a procedure cannot act directly as right hand side value for another procedure call.
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Florian for your quick response.
Yes, I want to pass the value returned by the procedure to a second input parameter. ( First input parameter is the one user enters a CALMONTH value)
The scenario is: I am creating a simple Calculation view in which one of the projection node need to be filtered based on the LYCM value returned from the Procedure;
Its not working in that way in my case Florian. I am getting Empty Result upon execution. Even not getting any error and the mapping is also looks good; It seems am missing some thing silly.
For your reference Mapping:
Interestingly, the generated SQL (for data preview) has no mention to the V_MONTH input parameter, which is the one applied as filter to CALMONTH Column:
Generated SQL:
SELECT TOP 200 "DATE_SQL", "YEAR", "CALMONTH" FROM "_SYS_BIC"."avp/CA_DATES_LYCM"('PLACEHOLDER' = ('$$IN_CALMONTH$$', '201309'))
Prasad
In the SQL the V_MONTH parameter is not mentioned because it is not of interest at that place. You are passing 201309 to IN_CALMONTH which is then passed to the procedure which determines the value for the V_MONTH parameter. That is done under the hood. Did you check what value the procedure returns? You can do this in a simple way, by e.g. adding a calculated column to the output which displays the value of the V_MONTH parameter.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.