Denis_35 Absent Member.
Absent Member.
1641 views

Running PL/SQL procedure

Jump to solution

Hello!

I have huge PL/SQL procedure (it generates xml file).

So i am wondering, what is the best way to run this procedure?

Should i format it as it shown in example (it will be VERY long string 🙂 ):

It is possible to run PL/SQL procedures using this operation. The examples below present the syntax to be used for having the same effect as the following PL/SQL script:
BEGIN
  send_message(addressee=>'b@hp.com',sender=>'pas@hp.com',subject=>'Test',message=>'Test');
END;

Example 1: BEGIN send_message(addressee=>'b@hp.com',sender=>'pas@hp.com',subject=>'Test',message=>'Test');END;


Or there are other ways?

 

And is it possibe to get result of PL/SQL script?

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Denis_35 Absent Member.
Absent Member.

Re: Running PL/SQL procedure

Jump to solution

I got agreement with DB admins - procedure will be stored in DB and run directly from it. I think this is the best decision for me.

0 Likes
2 Replies
Absent Member.. ntt00015 Absent Member..
Absent Member..

Re: Running PL/SQL procedure

Jump to solution

Hi,

 

It is not possible to get directly the output of the PL/SQL Procedure. But if your output has only one output, you can do it using a function with the SQL Query Operation.

 

SELECT your_function(inputs) function_result FROM dual;

 

Another way is to get the outputs is to write the outputs into a temporary table and then select the outputs with SQL Query operation at the preceding steps.

 

To run a SQL Command operation you can set the command input as a normal PL/SQL Script. For example :

**start***

BEGIN

 insert into some_table (column1, column2) values('${value1}', '${value2}');

p_some_procedure('${input1}', '${input2}');  /*p_some_procedure(input1 in varchar2, input2 in varchar2);*/

END;

***end***

 

 

0 Likes
Denis_35 Absent Member.
Absent Member.

Re: Running PL/SQL procedure

Jump to solution

I got agreement with DB admins - procedure will be stored in DB and run directly from it. I think this is the best decision for me.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.