CREATE OR REPLACE PROCEDURE MFGNO(BODYSRNO IN VARCHAR2)
IS
MFGSRNO VARCHAR2(8);
mfgno varchar2(8);
cnt varchar2(3);
BDATE DATE;
BEGIN
Select year_code||TO_C HAR(SYSDATE, 'MMDD') INTO mfgno from year_master
where year in (select to_char(sysdate ,'yyyy') from dual);
select lpad(count(*)+1 ,3,0) into cnt from manu where
substr(bodysrno ,1,1) in ('U','S','P')
AND bdate IN (SELECT SYSDATE FROM DUAL);
mfgno:=mfgno||c nt;
UPDATE manu SET mfgsrno=MFGNO WHERE BODYSRNO IN(SELECT BODYSRNO FROM MANU) ;
DBMS_OUTPUT.PUT _LINE(MFGSRNO);
END;
this is the procedure to create the trigger using this and put the output in that way bodysrno,mfgsrn o,bdate in one table so pls help me for creating trigger
IS
MFGSRNO VARCHAR2(8);
mfgno varchar2(8);
cnt varchar2(3);
BDATE DATE;
BEGIN
Select year_code||TO_C HAR(SYSDATE, 'MMDD') INTO mfgno from year_master
where year in (select to_char(sysdate ,'yyyy') from dual);
select lpad(count(*)+1 ,3,0) into cnt from manu where
substr(bodysrno ,1,1) in ('U','S','P')
AND bdate IN (SELECT SYSDATE FROM DUAL);
mfgno:=mfgno||c nt;
UPDATE manu SET mfgsrno=MFGNO WHERE BODYSRNO IN(SELECT BODYSRNO FROM MANU) ;
DBMS_OUTPUT.PUT _LINE(MFGSRNO);
END;
this is the procedure to create the trigger using this and put the output in that way bodysrno,mfgsrn o,bdate in one table so pls help me for creating trigger
Comment