Insert Into t_inventory(FID,单据号,单据类型,日期,年度,月份,仓库编码) Values(Fid,bill,billstyle,fdate,fyear,fmonth,stock) where Not Exists(Select * From t_inventory Where Fid=Fid)
declare v_num number; begin select 1 into v_num from t_inventory Where Fid=Fid; exception when others then Insert Into t_inventory(FID,单据号,单据类型,日期,年度,月份,仓库编码) Values(Fid,bill,billstyle,fdate,fyear,fmonth,stock); end; /
Values(Fid,bill,billstyle,fdate,fyear,fmonth,stock)
where Not Exists(Select * From t_inventory Where Fid=Fid)
v_num number;
begin
select 1 into v_num from t_inventory Where Fid=Fid;
exception
when others then
Insert Into t_inventory(FID,单据号,单据类型,日期,年度,月份,仓库编码)
Values(Fid,bill,billstyle,fdate,fyear,fmonth,stock);
end;
/