• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

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

String SP ="{? = call f1() }";
lCallableStatement = conn.prepareCall(SP);

At back end(oracle):
SQL> create or replace package p1
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.

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,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!