• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to return the index by variable from pl/sql to java

 
ganeshjanu janu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have the problem for the following scenario,

String SP ="{? = call f1() }";
lCallableStatement = conn.prepareCall(SP);
lCallableStatement.registerOutParameter(1,Types.STRUCT);
lCallableStatement.execute();

At back end(oracle):
SQL> create or replace package p1
as
type a is table of varchar2(20) index by varchar2(20);
end p1;
/

Package created.

SQL> create or replace function f1 return p1.a
2 as
3 o1 p1.a;
4 begin
5 o1('active'):='true';
6 dbms_output.put_line('val is'||o1('active'));
7 return o1;
8 end;
9 /

Function created.

BUG:
but i got the error while run the code.

SQ exception:2002 invalid column type:


If anyone have the suggestion then tell me.
with regards,
ganesh.s
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic