在调用存储过程时出错,代码如下,执行第一、二个insert into语句是能通过的,但后面的都不能通过,谁能帮我指出问题在哪?create or replace procedure PR_USERINFO_INSERT(
vchr_ID in T_USERS.id%type, --用户ID
vchr_Name in T_USERS.name%type, --用户姓名
vchr_DeptID in T_USERS.deptid%type, --部门ID
vchr_Pos in T_USERS.pos%type, --职位
vchr_RoleID in T_UserRole.RoleID%type, --角色ID
vchr_PesDept in T_USERDATA.dataid%type, --负责部门
vchr_AlertType in T_AlertUser.AlertType%type, --预警类型
vchr_CUserID in T_USERS.cuserid%type, --新增者ID
dat_CTime in T_USERS.ctime%type, --新增时间
retval out number) ischv_userdata_seq varchar2(30); --错误日志IDbegin
select to_char(seq_userdata_id.nextval) into chv_userdata_seq from dual; insert into T_USERS (Id
,Name
,pwd
,Deptid
,Pos
,pwddate
,Cuserid
,Ctime)
values(vchr_ID,vchr_Name,'111111',vchr_DeptID,vchr_Pos,dat_CTime,vchr_CUserID,dat_CTime);
//能运行通过
insert into T_USERDATA(ID,USERID,Dataid,Relatype,Cuserid,ctime)
values(4,'admin','VI','0','admin',to_date('2011-01-18','yyyy-mm-dd'));
//不能运行通过
--insert into T_USERDATA(ID,USERID,Dataid,Relatype,Cuserid,ctime)
--values(5,vchr_ID,vchr_PesDept,'0',vchr_CUserID,dat_CTime);
//不能运行通过
--insert into T_USERROLE(ID,Userid,Roleid,Cuserid,ctime)
--values(1,vchr_ID,vchr_RoleID,vchr_CUserID,dat_CTime);
//不能运行通过
--insert into t_Alertuser(ID,Userid,alerttype,Cuserid,ctime)
--values(1,vchr_ID,vchr_AlertType,vchr_CUserID,dat_CTime); retval := 0;
commit;
exception
when others then
retval := -1;
rollback;
end PR_USERINFO_INSERT;
vchr_ID in T_USERS.id%type, --用户ID
vchr_Name in T_USERS.name%type, --用户姓名
vchr_DeptID in T_USERS.deptid%type, --部门ID
vchr_Pos in T_USERS.pos%type, --职位
vchr_RoleID in T_UserRole.RoleID%type, --角色ID
vchr_PesDept in T_USERDATA.dataid%type, --负责部门
vchr_AlertType in T_AlertUser.AlertType%type, --预警类型
vchr_CUserID in T_USERS.cuserid%type, --新增者ID
dat_CTime in T_USERS.ctime%type, --新增时间
retval out number) ischv_userdata_seq varchar2(30); --错误日志IDbegin
select to_char(seq_userdata_id.nextval) into chv_userdata_seq from dual; insert into T_USERS (Id
,Name
,pwd
,Deptid
,Pos
,pwddate
,Cuserid
,Ctime)
values(vchr_ID,vchr_Name,'111111',vchr_DeptID,vchr_Pos,dat_CTime,vchr_CUserID,dat_CTime);
//能运行通过
insert into T_USERDATA(ID,USERID,Dataid,Relatype,Cuserid,ctime)
values(4,'admin','VI','0','admin',to_date('2011-01-18','yyyy-mm-dd'));
//不能运行通过
--insert into T_USERDATA(ID,USERID,Dataid,Relatype,Cuserid,ctime)
--values(5,vchr_ID,vchr_PesDept,'0',vchr_CUserID,dat_CTime);
//不能运行通过
--insert into T_USERROLE(ID,Userid,Roleid,Cuserid,ctime)
--values(1,vchr_ID,vchr_RoleID,vchr_CUserID,dat_CTime);
//不能运行通过
--insert into t_Alertuser(ID,Userid,alerttype,Cuserid,ctime)
--values(1,vchr_ID,vchr_AlertType,vchr_CUserID,dat_CTime); retval := 0;
commit;
exception
when others then
retval := -1;
rollback;
end PR_USERINFO_INSERT;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货