标签:
create or replace procedure sp_addProjectQj(
ret out number,
flowid in number --流程Id
)
as
cursor c_design is
select * from LC_VR_Detail where lc_crm_visitreport_Id = flowid and dd_status != 2;
c_row c_design%rowtype;
v_id number;
begin
for c_row in c_design loop
pnextid(‘T_XMSJQJ‘,v_id);
--项目涉及器件(id,项目名称,器件) values --design明细表(v_id,项目名称,器件名称)
insert into T_XMSJQJ(id,f2,sj,fqj,f3,cj,fsl,fbz,fqzje,fldknx,fldjz,fcyyy,fdocnum,fgdyy,f6,bz)
values (v_id,c_row.dd_project,c_row.DD_Newtime,c_row.dd_name,c_row.dd_model,c_row.dd_brand,
c_row.dd_num,c_row.dd_currency,c_row.dd_HideCash,c_row.DD_SureChance,c_row.DD_SureEvolve,
c_row.DD_Difference,c_row.dd_docnum,c_row.dd_whyclose,c_row.dd_Designinstatus,c_row.dd_remarks );
commit;
end loop;
ret:=1;
EXCEPTION
WHEN OTHERS THEN
ret:=-1;
end;
标签:
原文地址:http://www.cnblogs.com/zkx4213/p/4968283.html