I need to input an array of ID (which is of NUMERIC type) and value (which is of VARCHAR2 type) as a parameter to a stored procedure. The Structure is given below
TYPE plan_dtl AS OBJECT(
p_id NUMERIC,
p_value VARCHAR2
);
TYPE plan_tbl AS TABLE OF plan_dtl;
PROCEDURE sp_update(p_name IN OUT VARCHAR2, p_array IN pk_manage.plan_tbl);
Can anyone tell me how to set an array of values in the position 2 using java ?
CallableStatement cs = conn.prepareCall("{call package_name.sp_update(?,?)}");
cs.registerOutParameter(1,Types.CHAR);
cs.setString(1, "some name");
cs.setArray(2, "how to pass it here ?")
sample inputs will be like
id(NUMERIC) value(VARCHAR2)
[{88627,"02"},{88671,"01"},{88644,"05"}]
all these values should be passed as an array to the callable statement at position 2