想要得到查询结果 类似0Z0001C 0000102508/0000400485/0000102549/0000102510/0000400488
create or replace procedure SelectTest(msg out VARCHAR2) as
v_name varchar2(50);
cursor c_sell is
select c.contract_number
from (select c.roll_plan_number,c.contract_number
from ecc_oc.sap_contract c, ecc_oc.sales_order_stand t
where t.roll_plan_number = c.roll_plan_number
order by c.roll_plan_number);
begin
open c_sell;
loop
fetch c_sell
into v_name;
exit when c_sell%notfound;
msg := msg || v_name || ',';
end loop;
close c_sell;
end;
我自己写的 不能实现,大神帮帮忙啊!!!