Stored Procedure Error ORA-06550: line 1, column 7: PL/SQL: Statement ignored

Hi,

 

I have been trying to use execute stored procedure smart service but when I followed the same use case mentioned in Documentation for Stored Procedure with SP_BOOKLIST, while using the smart Service in Process I got the error:

ORA-06550: line 1, column 7:PLS-00306: wrong number or types of arguments in call to 'SP_LISTBOOKS'ORA-06550: line 1, column 7:PL/SQL: Statement ignored

 

When I am following the same in function as per documentation, I am getting the error:

Interface Definition: Expression evaluation error : Invalid index: Cannot index property '_foundation' of type Text into type List of Variant:

Attached is the code, I used in interface Rule

=with(
local!spResult: fn!executestoredprocedure(
"jdbc/OracleDataSource",
"SP_LISTBOOKS",
{
{name: "title_search", value: "%pig%"}
}
),
if(local!spResult.success,
local!spResult.result,
local!spResult.error
)
)

I also checked permission in Oracle DB & the connection type is "Basic" & role is "Default".

Can anyone please guide where I am getting it wrong & how can I fix it?

Thanks

Rishu

  Discussion posts and replies are publicly visible

Parents Reply
  • :: I ran the following script in Oracle:

    CREATE TABLE "book" (
    "title" varchar2(50),
    "author" varchar2(20),
    "quantity" int,
    "price" float
    );
    INSERT INTO "book" VALUES ('Peppa Pig: Fun at the Fair', 'Collectif', 23, 3.74);
    INSERT INTO "book" VALUES ('Panda Goes to the Olympics', 'Judith Simanovsky', 7, 4.99);
    INSERT INTO "book" VALUES ('Topsy and Tim Visit London', 'Jean Adamson', 15, 3.29);
    CREATE OR REPLACE PROCEDURE sp_ListBooks (
    title_search IN varchar2,
    total_cost OUT float,
    books_cursor OUT SYS_REFCURSOR
    )
    AS
    BEGIN
    OPEN books_cursor FOR SELECT "title", "author", "quantity", "price" FROM "book" WHERE "title" LIKE title_search;
    SELECT SUM("quantity" * "price") INTO total_cost FROM "book" WHERE "title" LIKE title_search;
    END;
Children