oracle12安装88%卡住,帮帮~插入队列到10就卡住了一只是10解决办法

SQL codeCREATE OR REPLACE Procedure p_b_insertmz(scardno Varchar2,scheckno Varchar2,scheckname varchar2,shiscardno Varchar2,spatientname Varchar2,spatientsex Varchar2,spatientage Varchar2,

spatientid varchar2, sVoucherNo Varchar2,sfreetype Varchar2,sregistope Varchar2,drgistdate Date, ipatientautoid Out Number )

--将门诊病人加入排队

Is

maxorderi Number;

maxno Number;

icout Number;

chkflag varchar2(2);

Begin

Select nvl(max(patientorder)+5,5 ) Into maxorderi From t_b_patient Where to_char(patienttime,'yyyymmdd')=to_char(Sysdate,'yyyymmdd');

Select nvl(Max(patientno)+1,1) Into maxno From t_b_patient Where to_char(patienttime,'yyyymmdd')=to_char(Sysdate,'yyyymmdd') And checkno=scheckno ;

Select Count(*) Into icout from t_b_checkkind Where checkno=scheckno;

chkflag:='A';

If icout>0 Then

Select nvl(checkflg,'A') Into chkflag from t_b_checkkind Where checkno=scheckno;

End If;

Select s_b_patient.nextval Into ipatientautoid From dual;

Insert Into t_b_patient(autoid,cardno,hiscardno,patientid,patientno,patientname,patientsex,patientage,registtime,feetype,voucherno,rigistdate,

registope, ispre,isinvalid,checkname,patientstatus,patienttime,patientprior,patientorder,checkno,checkflag)

Values(ipatientautoid,scardno,shiscardno,spatientid,maxno,spatientname,spatientsex,spatientage,sysdate,sfreetype,svoucherno,drgistdate,

sregistope,0,0,scheckname,1,sysdate,'D-普通',maxorderi,scheckno,chkflag);

Commit;

End p_b_insertmz;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值