Oracle Stored Procedure Syntax

Source: Internet
Author: User

1 Create or Replace procedureLis_zhifang_return_confirm (Barcodeinch varchar2, Deptcode1inch varchar2)2  as3 begin4    UpdateClc_recipe RSetR.deptcode=Deptcode1, R.deptname='Inspection Section' whereR.labcode=Barcode;5    Commit;6 7 End;

1 CREATE OR REPLACE PROCEDUREPeis_transmitresult (2Barcodeinch varchar2,--Barcode Number3Excdoctorinch varchar2,--Execute Doctor ID4Excdoctornameinch varchar2,--Executive Doctor name5ExcdateinchDate,--Execution Date6Resultinch varchar2,--Result Values7Indidinch varchar2,--Small Item ID8Indnameinch varchar2,--Small Item Name9Unnormalinch varchar2,--positive anomaly FlagTensninch varchar2,--Small Item Number OneMaxvalinch varchar2,--Result Maximum Value AMinvalinch varchar2,--Result Minimum Value -Resultunitinch varchar2,--result units -Rangeinch varchar2  --Reference Range the )  -  as - --Variable Area -V_hosnumvarchar2(6) :="';--Hospital Code +V_itemuuidvarchar2( -) :="';--combination of UUID -V_examidvarchar2( the) :="';--Reservation Form ID +V_pexamidvarchar2( the) :="';--Physical Examination Number AV_itemcodevarchar2( the) :="';--Project ID atV_itemnamevarchar2( -) :="';--Project Name -V_excdeptvarchar2(Ten) :="';--Perform Department ID -V_excdeptnamevarchar2(Ten) :="';--Executive department Name -V_excdoctorvarchar2(Ten) :=Excdoctor;--Execute Doctor ID -V_excdoctornamevarchar2( -) :=Excdoctorname;--Executive Doctor name -V_excdate Date:=Excdate;--Execution Date inV_resultvarchar2( -) :=result;--Execution Date -V_indidvarchar2( -) :=Indid;--Small Item ID toV_indnamevarchar2( -) :=Indname;--Small Item Name +V_unnormalvarchar2( -) :=Unnormal;--positive anomaly Flag -V_snvarchar2(Ten) :=SN;--Small Item Number theV_maxvalvarchar2(Ten) :=Maxval;--Result Maximum Value *V_minvalvarchar2(Ten) :=Minval;--Result Minimum Value $V_resultunitvarchar2(Ten) :=Resultunit;--UnitPanax NotoginsengV_rangevarchar2(Ten) :=Range;--Reference Range -  theV_count Number:=0;--number of results not returned + BEGIN A  the SelectA.hosnum,a.itemuuid,a.examid,a.pexamid,a.itemcode,a.itemname,a.excdept,a.excdeptname +  -  intoV_hosnum,v_itemuuid,v_examid,v_pexamid,v_itemcode,v_itemname,v_excdept,v_excdeptname $  fromPexam_items_title AwhereA.tmcode=Barcode; $ --Insert Result Table - Insert  intoPexam_results - (Hosnum, Examid, Pexamid, Excdept, Excdeptname, Excdoctor , Excdoctorname, the excdate, StringValue, NumValue, result, Comid, Comname, indid, Indname , - Examtype, Unnormal, Itemuuid, SN, maxval, Minval, Resultunit, Range, ParentID)Wuyi Values the (V_hosnum, V_examid, V_pexamid, V_excdept, V_excdeptname, V_excdoctor, v_excdoctorname -, V_excdate,"',"', V_result, V_itemcode, V_itemname, V_indid, V_indname, Wu    "', V_unnormal, V_itemuuid, V_SN, V_maxval, V_minval, V_resultunit, V_range,"'); - Commit; About  $ --determine whether the combination of the following small results are available, - --If you have all the receipts, this combination is saved as completed. Otherwise, no receipts.  - Select Count(*)Count  intoV_count fromPexam_results CwhereC.pexamid=V_pexamid -  andC.itemuuid=V_itemuuid andC.excdate is NULL ; A IFV_count=0  Then +    BEGIN  the        UpdatePexam_items_title ASetA.excdate=V_excdate,a.excdoctorid=V_excdoctor, A.excdoctorname=V_excdoctorname,a.deptsum="'  -        whereA.hosnum=V_hosnum andA.itemuuid=V_itemuuid; $        Commit; the    END; the  END IF; the  the ENDPeis_transmitresult;

Oracle Stored Procedure Syntax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.