declare
v_0 number;
v_1 number;
cursor c1 is select productordernumber from his_productorder@pro_crm where productid in (9000045516);
cursor c2 is select cust_order_id from suf_cust_order_q_his where cust_order_num like v_0||'%';
cursor c3 is select * from suf_work_order_q_his where cust_order_id=v_1;
begin
for i in c1 loop
v_0:=i.productordernumber;
for j in c2 loop
v_1:=j.cust_order_id;
for k in c3 loop
dbms_output.put_line(k.work_order_id||' '||k.status);
end loop;
end loop;
end loop;