Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BULK COLLECT, DBLINK and 8i

Status
Not open for further replies.

DCCoolBreeze

Programmer
Jul 25, 2001
208
US
I understand that I cannot use the bulk collect with a dblink under 8i so I was told to use cast(multiset... I do not completely understand how to make it work so I am including the code I need to replace with cast(multiset...

DECLARE
type x_tab is table of ap_invoices_all.invoice_num%type;
type y_tab is table of ap_invoices_all.invoice_amount%type;

CURSOR C1 IS
SELECT api.x1, api.x2
FROM apll api,
ap2ll apip,
po_all pvs, --(this a synonym to a dblink)
po_2s pov,
ap_2 apc
WHERE apc.dd = 123
AND apc.vv = pov.vv
AND pov.ee = 2
AND pov.rr = pvs.rr
AND apc.abv = pvs.abv
AND apc.id = apip.id
AND apip.id = api.id
AND api.num NOT LIKE '23%';

taba x_tab;
tabb y_tab;
idx PLS_INTEGER;

BEGIN

dbms_output.put_line('Start: ' || to_char(sysdate,'mm/dd/rr hh:mm:ss'));
open c1;
fetch c1 BULK COLLECT into taba, tabb;

IF taba IS NOT NULL THEN

idx := taba.FIRST;
WHILE idx IS NOT NULL LOOP

-- do something with ...
-- taba(idx);
-- tabb(idx);

idx := taba.NEXT(idx);
end loop;
END IF;
dbms_output.put_line('End: ' || to_char(sysdate,'mm/dd/rr hh:mm:ss'));
END;

It is interesting because I do not get an error in this code but I have been told that the FETCH...BULK COLLECT and dblink do not work on 8.1.7

so how can I replace this code with a CAST - MULTISET ??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top