同时给两个变量值赋值
同时给两个变量值赋值
1 --说明:查询“退换货单号”,"订单编号" 2 --作者:杨斌 3 --日期:2012-09-26 4 Procedure PRO_QUERY_CHAORRET_ID( 5 prm_origin_id varchar2, --来源单号 6 prm_return_id varchar2, --线上退货单号 7 8 out_chaorret_id out varchar2, --退换货单号 9 out_order_id out varchar2, --订单编号 10 out_error_row out number, --错误行 11 out_error_msg out varchar2 --错误信息 12 ) 13 IS 14 resultCount Integer(4); 15 16 BEGIN 17 out_error_row := 0; 18 out_error_msg := ''; 19 20 SELECT count(chaorret_id) into resultCount 21 FROM t_dd_returnorchange_note@linkERP 22 WHERE ORIGIN_ID = prm_origin_id 23 AND RETURN_ID = prm_return_id; 24 25 if resultCount > 0 then 26 27 SELECT NVL(t.chaorret_id,''), NVL(t.order_id,'') INTO out_chaorret_id, out_order_id
28 FROM t_dd_returnorchange_note@linkERP t 29 WHERE ORIGIN_ID = prm_origin_id 30 AND RETURN_ID = prm_return_id; 31 32 else 33 34 out_chaorret_id := ''; 35 out_order_id := ''; 36 37 end if; 38 39 out_error_row :=1000;--错误行 40 41 EXCEPTION 42 when others then 43 out_error_msg := '数据库错误:' || sqlerrm; 44 45 END PRO_QUERY_CHAORRET_ID;