同时给两个变量值赋值
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 IS14 resultCount Integer(4);15 16 BEGIN17 out_error_row := 0;18 out_error_msg := '';19 20 SELECT count(chaorret_id) into resultCount 21 FROM t_dd_returnorchange_note@linkERP22 WHERE ORIGIN_ID = prm_origin_id23 AND RETURN_ID = prm_return_id;24 25 if resultCount > 0 then26 27 SELECT NVL(t.chaorret_id,''), NVL(t.order_id,'') INTO out_chaorret_id, out_order_id 28 FROM t_dd_returnorchange_note@linkERP t29 WHERE ORIGIN_ID = prm_origin_id30 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 EXCEPTION42 when others then43 out_error_msg := '数据库错误:' || sqlerrm;44 45 END PRO_QUERY_CHAORRET_ID;