on 02-18-2015 12:55 PM
HI Experts
1. I have created a Calculation View with two input parameters
2, Now I have created a procedure with two input parameters
3. Now I want to call the calcview in my procedure passing the input parameters created in my procedure
syntax
begin
it_out = select * from calcview ( 'PLACEHOLDER' = ( '$$input1$$ ', :ip_input1 ),
'PLACEHOLDER' = ( '$$input2$$ ', :ip_input2 ) );
end;
Is my approch correct ?
Can we call view from procedure
Thanks
Pawan Akella
Hi Pawan,
Use this:
begin
it_out = select * from "_SYS_BIC"."<package_name>/<view_name>"
( PLACEHOLDER."$$input1$$" => :ip_input1, PLACEHOLDER."$$input2$$" => :ip_input2);
end;
Thanks,
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pawan,
To summarize, first you need to declare these input parameters in your procedure IN, ie
CREATE PROCEDURE "schema"."procedure"( in input1 int, in input2 int,out it_out)
LANGUAGE SQLSCRIPT AS
.
.
.
Then use it in your calculation view as shown
it_out = select * from "_SYS_BIC"."<package_name>/<view_name>"('PLACEHOLDER' = ('$$input_param1$$', :input1 ), 'PLACEHOLDER' = ('$$input_param2$$', :input2));
Here $$input_param1$$ is the input parameter present in your cv. Hope you are clear..
Cheers,
Safiyu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pawan,
Yes, you can do that.
Thanks
Praneeth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
No your syntax is wrong. You have to use Generated column views for the respective CV from sys_bic schema. Also you dont have to use placeholder. While creating a procedure you have a option of defining inputs either using IN keyword or from the window in your right side.
To use an input you can directly use : followed by your input name.
Regards,
Safiyu
Hi Safiyudeen
I am using CV generated in _SYS_BIC schema and I also created input parameters using the option available on the right hand side
My question is
it_output -> this is my procedure output created on the right hand side
it_output = select * from "_sys_bic"."package_name/CV_NAME"
('PLACEHOLDER', ( '$$cv_input$$' , :ip_proc_input);
Is my above synax is correct
Am I calling the CV correctly from Procedure using input parameters
Thanks
Pawan Akella
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
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.