30
Views
2
Comments
[Oracle Connector - P11] [Oracle Connector - P11] Calling a Store Procedure with a table as input
Question
oracle-connector-p11
Web icon
Forge asset by Eduardo Oliveira

Hi, does the plugin works if I have a table as one of the input parameter in the Store Procedure?

I tried running the follow codes, but it throws ORA-06550: PLS-00306: wrong number of types of arguments. 

create or replace TYPE TEST_TBL AS TABLE OF TEST_OBJ;
create or replace TYPE TEST_OBJ AS OBJECT ( VALUE NUMBER(2,0) );

PROCEDURE TEST_INPUT_TABLE_PRC(
             IN1_TBL IN TEST_TBL 
             , OUT1 OUT NUMBER
             , OUTTEXT OUT VARCHAR2
) AS
BEGIN
             OUT1 := 0;
             OUTTEXT := 'Started. ';
             IF IN1_TBL.First IS NOT NULL THEN
                          FOR i in IN1_TBL.First .. IN1_TBL.count
                          LOOP
                                       OUT1 := OUT1 + IN1_TBL(i).VALUE;
                                       OUTTEXT := OUTTEXT || ' Read ' || to_char(IN1_TBL(i).VALUE) || '. ';
                          END LOOP;
             END IF;            
END;



Thanks.

Eugene



2023-11-27 05-06-32
Suyash Suyash

I guess you will have to map all the columns from the in table in accordance with your input parameters of your procedure. It can't be just one integer 'Value'. I hope this helps

UserImage.jpg
Mher  Darakjian

any solution for the above ?


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.