call a function from a package
488406Feb 6 2006 — edited Feb 6 2006hi im new to oracle, so please excuse me if this is an obviouse question.
Im trying to put a function in a package, so i can call it from crystal reports.
the function works, and i can call the package from crystal reports, but i think ive mesed up calling the function from the package, any ideas???
also any recomendations for a good online beginers guide to plsql
thnaks
james
----------------------------------------------------------------------------------------
create or replace package body Enhanced_Pharos_Report as
v_Media_Object_Name varchar2;
------------------------
function Media_Object_Name(Detail_id Number) return varchar2 as
Result varchar2(300);
begin
SELECT promo_name
INTO Result
FROM promo
WHERE promo_id = (SELECT promo_id
FROM promo_plan
WHERE promo_plan_id = (SELECT promo_plan_id
FROM event_promotion
WHERE detail_id = detail_id));
return(Result);
end Media_Object_Name;
------------------------
PROCEDURE run_report
(main_cursor IN OUT result_set_type,
detail_id NUMBER)
v_Media_Object_Name := Media_Object_Name (detail_id);
end;
------------------------------------------------