I have a select statement which is as follows
SELECT
PLN.PLAN_NAME,
HON.IVC_CODE,
HON.FORENAME,
HON.SURNAME,
HON.SALUTATION
FROM PLANS PLN
INNER JOIN COMPANIES COMP ON
COMP.COMP_CODE = PLN.COMP_CODE
INNER JOIN TRADING_STOCK_EXCHANGES TSE ON
TSE.COMP_CODE = COMP.COMP_CODE
INNER JOIN FINANCE_ORGANISATIONS FORG ON
FORG.FINANCE_ORG_ID = TSE.FINANCE_ORG_ID
INNER JOIN HOLDER_NAMES HON ON
HON.COMP_CODE = PLN.COMP_CODE
WHERE FORG.FINANCE_ORG_TYPE_CODE = 'SE' AND
COMP.COMP_CODE = 'B598' AND
--HON.FORENAME LIKE '%g%' AND
FORG.ORG_NAME IN ('NASDAQ','NEW YORK STOCK EXCHANGE');
This works and I can see the results.
I have a package function rr400_generate_sip_movement.get_sip_movement which accepts one In Parameter and tree output parametes. I have put something like this so far
declare
po_plan_name VARCHAR2(10 CHAR);
po_client_comp_name VARCHAR2(50 CHAR);
po_comp_code VARCHAR2(10 CHAR);
rc sys_refcursor;
ab sys_refcursor;
begin
rc := rr400_generate_sip_movement.get_sip_movement(137610, po_plan_name, po_client_comp_name, po_comp_code);
end;
When I run this I see a message PL/SQL statement completed successfully. I am assuming the PL/SQL block is good.
What I would like to do is join the package functions results with my select statement results on IVC_CODE(Column Name as per select statement). I am only interested in the IVC's which are in the package function.
Any help is much appreciated. sorry I am new to PL/SQL. I have tried a few routes for this and as per the suggestion from @littlefoot in my other question
PL/SQL Function result to a table
This approach might be a cleaner and tidier approach. Thanks in advance.