首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

PLS-00103:出现符号"EXCEPTION "在需要下列之一时,oracle中存储过程异常捕获。

2014-01-28 
create or replace procedure pro_DataCopyAndCheck is ls_COD varchar2(50) ls_STA VARCHAR2(1) ls_LNG

create or replace procedure pro_DataCopyAndCheck is
ls_COD varchar2(50);
ls_STA VARCHAR2(1);
ls_LNG VARCHAR2(3);
ld_EMS DATE;
ls_OPR_EMS VARCHAR2(20);
ls_REV VARCHAR2(3);
ld_REV DATE;
ls_OPR_REV VARCHAR2(20);
ls_SIG_PRD VARCHAR2(1);
ls_FIL_LAME VARCHAR2(1);
ls_COD_LAME VARCHAR2(5);
cursor get70TableData is
  select I94_COD_QCP,I94_STA_QCP,I94_LNG_QCP,D94_EMS_QCP,T94_OPR_EMS_QCP,
  I94_REV_QCP,D94_REV_QCP,T94_OPR_REV_QCP,I27_SIG_PRD,
  F94_FIL_LAME,I94_COD_LAME from TGED070_QCP_STANGING;
begin
  open get70TableData;
  fetch get70TableData into
  ls_COD,ls_STA,ls_LNG,ld_EMS,ls_OPR_EMS,ls_REV,ld_REV,
  ls_OPR_REV,ls_SIG_PRD,ls_FIL_LAME,ls_COD_LAME;
  while get70TableData%found loop
  insert into TGED070_QCP values
  (ls_COD,ls_STA,ls_LNG,ld_EMS,ls_OPR_EMS,ls_REV,ld_REV,
  ls_OPR_REV,ls_SIG_PRD,ls_FIL_LAME,ls_COD_LAME);
 
  EXCEPTION
 
  when others then
  ls_COD := " ";
 
  fetch get70TableData into
  ls_COD,ls_STA,ls_LNG,ld_EMS,ls_OPR_EMS,ls_REV,ld_REV,
  ls_OPR_REV,ls_SIG_PRD,ls_FIL_LAME,ls_COD_LAME;         

热点排行