Wednesday 28 March 2012

Function to get the location from hr_location table

CREATE OR REPLACE function getloc(p1 in number) return varchar2 as

v_loc varchar2(50);

begin

select location_code into v_loc from hr_locations

where location_id=p1;

return v_loc;

end;
/

No comments:

Post a Comment