I have created a type inside a package and declared a function as below.
type backupStatus_t is table of d_backupstatus%ROWTYPE;
function getLatestBackupInfo return backupStatus_t;
Now, inside the package body, I have defined the function as below.
function getLatestBackupInfo RETURN backupStatus_t as
v_backupStatus backupStatus_t;
begin
select * bulk collect into v_backupStatus from d_backupstatus;
return v_backupStatus;
end;
Package compiles successfully. When I try to call this function, I am getting "invalid datatype".
Can anyone help??