Hi
I am new to Oracle. I have a procedure getLoanInfo that returns a recordset as ref cursor. I just want to call it from the PL/SQL.
my doubt is regarding the declaration of the tblLoans%rowtype. Here tblLoans is one table but the result set returned by the proc contains a differrent data set. ie, it is the result set from more than one table.
So how do I specify it in the %rowtype. Or any other way. I tried it in the following way and I got an error
declare
type r_cursor is REF CURSOR;
c_var r_cursor;
res tblLoans%rowtype;
begin
pkgmain.getLoanInfo('AK','AK020',NULL,c_var);
loop
fetch c_var into res;
exit when c_var%notfound;
dbms_output.put_line(res.closingBal);
end loop;
close c_var;
end;
ORA-00932: inconsistent datatypes: expected - got -
ORA-06512: at line 8
00932. 00000 - "inconsistent datatypes: expected %s got %s"