Not able to execute SQL stored procedure from Uipath

Hi,

I have a stored procedure, where I am trying to execute by using “Call” in “Execute Query” Activity and passing the required input. The return type of the procedure id “Refcursor Recordset”. Iam using the following commands to execute it:

VAR vcur refcursor;
declare
TYPE Recordset IS REF CURSOR;
O_CURSOR RECORDSET;
begin

TK_WORKFLOW_API.GETPAYSUMMARY(‘01-JAN-2020’,O_CURSOR=>:vcur);
end;

-> when I run the above command from uipath I am getting error like “Execute Query 1: ERROR [42000] [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement”.
but when I tried running the same from sql management application, I am able to get the output.

-> when I tried declaring the return type locally, it is showing error like below screenshot

Can anyone please tell me is there any way or limitations in UiPath to execute the stored procedure with return type as “ref cursor recordset”

2 Likes

Hey @neeharika9510, Happy to see you here.

Are you trying to pass the raw string in execute query property.

If yes could you please save stored procedure script in a notepad and then read it as a string, pass the variable in property.

This may help, Kindly try.

The goal here is to escape all the characters used in query.

Thanks :slight_smile: