Hi
I have the following procedure which I need to convert into calc/attribute view . Please suggest how to do that?
procedure proc1(IN p1 numeric, IN p2 numeric, OUT ref cursor )
declare
var1 character varying;
begin
select region
into var1
from unit_level_mapping
where unit = p1
and level = p2;
if(p1 = 1) then
open ret_cursor for
SELECT region_code,region_name
FROM t_region where code = 3;
elsif(p1 = 2) then
open ret_cursor for
SELECT at_country_code, at_country_name
FROM t_country where at_regioncode = var1; -- from the initial select stmt
end if;
end ;
Regards
Rajib