日期:2014-05-17 浏览次数:20835 次
declare Import_Date date; begin Import_date:=to_date('2011-04-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-05-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-06-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-07-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-08-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-09-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-10-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-11-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2011-12-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2012-01-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2012-02-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end; / declare Import_Date date; begin Import_date:=to_date('2012-03-01','YYYY-MM-DD'); sp_GetOCNResult_XH(Import_Date); commit; end;
修改下lz的代码: begin declare Import_Date int; commit; set Import_Date = 201104[code=SQL]
------解决方案--------------------
修改下lz的代码: begin declare Import_Date int; commit; set Import_Date = 201104 while Import_Date<20111201 loop sp_GetOCNResult_XH(Import_Date);---接收参数存储过程接收字符类型 set Import_Date = Import_Date+100; end loop; set Import_Date = 20120101 while Import_Date<20120301 loop sp_GetOCNResult_XH(Import_Date);---接收参数存储过程接收字符类型 set Import_Date = Import_Date+100; end loop; end;