hi guru's,

I  got a little  question here, there is funciton which would return
curosr
=======================================
create or relplace funcion (pvar varchar2)
return pak.cursor
as
pkddetails pak.cursor;
begin
open pkddetails for
select * from emp where empid=pvar
return pkddetail ;
end;
/
=======================================
the above fucnton parameter is converted to an arrray
i.e
create or replace type t_rec is table of varchar2(20);
now i have to the change the sqlstatement  in the fucntion to  have
"in"  statement  to get all the records.
i.e
=======================
create or relplace funcion (pvar t_rec)
return pak.cursor
as
pkddetails pak.cursor;
Mempid varchar2(1000);
begin
for i in 1..pvar.count loop
if mempid is null then
mempid:=pavar(i);
else
mempid:= mempid||','||pvar(i);
end if;
end loop;

open pkddetails for
select * from emp where empid in mempid;    ------ here is my
questionn

return pkddetail ;
end;
/
==============================================================================
but the above sql statetment (having IN ) does not  work, is there a
way to make it work
or should i change the whole logic to return an array again .
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to