Creating view using Oracle Sample Procedure

Nitin Kharat shared this question 2 months ago
Answered

Hi,

I have created procedure using oracle returning multiple rows, which is working perfectly in oracle returning collection but its giving errors in yellowfin attached in file. Procedure is as follows

create or replace type emp_obj is object (empno varchar2(100), ename varchar2(100));


create or replace type emp_tab is table of emp_obj;


create or replace function all_emps return emp_tab

is

l_emp_tab emp_tab := emp_tab();

n integer := 0;

begin

for r in (select lc.LOCATION_ID, lc.location_name

from T_LOCATION lc

where lc.DISABLE_LOCATION is null

and (not exists( select null from t_installation i where i.installation = lc.location_id and i.is_contingency_org_land is not null))

)

loop

l_emp_tab.extend;

n := n + 1;

l_emp_tab(n) := emp_obj(r.LOCATION_ID, r.location_name);

end loop;

return l_emp_tab;

end;
Please can u see error or can you provide sample simple procedure in oracle returning multiple rows.

Comments (1)

photo
1

Hi Nitin,

We have a ticket in progress regarding this already here: https://community.yellowfinbi.com/agent/object/17764.

I've not responded in a couple days as we had a national holiday Monday and I was out-of-office yesterday as well. I apologize for the delay, but please let's continue troubleshooting this issue in the linked ticket and I'll close this one out.

Regards,

Mike

photo
1

Ok Mike,

Thanks,

Nitin

photo
1

Hi Nitin,

You're welcome. I'll be responding in that ticket shortly.

Regards,

Mike

photo