Hello,
You can certainly execute Stored Procedure from Automation Anywhere using Database:Run Stored Procedure command. In addition, you can pass parameter(s) to stored procedure. Unfortunately, you cannot return value(s) from stored procedure however, this feature is supported in upcoming release of product, which is going to release shortly.
To get around the issue, add one more command in your stored procedure, insert 'Insert into' statement to store the return values in some temporary table. After Database:Run Stored Procedure command, you can insert 'Execute SQL Statement' command to retrieve the return values from same temporary table.
Text format of stored procedure would appear something like this,
create or replace procedure ProcParam(a in number, b in number)
is
begin
UPDATE productTable set qty = a where orderid = b;
INSERT INTO product_temp (qty, orderid)
SELECT qty, orderid
FROM productTable
WHERE orderid= b;
end;
Hope that helps.
|