Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Convering a procedure to HANA information views

$
0
0

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


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>