You are on page 1of 12

(PROCEDURE FOR INSERTING ROW INTO AMBU_DET_GR1 TABLE)

create or replace procedure proc_insert_gr1


(p_ambulance_num number,p_type varchar2,p_charge number)
is
e_typecheck exception;
e_chargecheck exception;
e_checknull exception;
e_checkunique exception;
pragma exception_init(e_typecheck,-2290);
pragma exception_init(e_checknull,-1400);
pragma exception_init(e_checkunique,-0001);
begin
if p_charge<=0 then
raise e_chargecheck;
end if;
insert into ambu_det_gr1
values(p_ambulance_num,p_type,p_charge);
commit;
exception
when e_checkunique then
dbms_output.put_line(chr(10)||'YOU CANNOT INSERT SAME AMBULANCE NUMBER
AGAIN');
dbms_output.put_line('PLEASE ENTER UNIQUE VALUE FOR AMBULANCE NUMBER');
when e_checknull then
dbms_output.put_line(chr(10)||'YOU CANNOT INSERT NULL');
dbms_output.put_line('PLEASE INSERT A VALUE');
when e_chargecheck then
dbms_output.put_line(chr(10)||'WRONG AMOUNT ENTERED');
dbms_output.put_line('CHARGE CAN ONLY BE MORE THAN ZERO');
when e_typecheck then
dbms_output.put_line(chr(10)||'WRONG AMBULANCE TYPE ENTERED');
dbms_output.put_line('TYPE CAN ONLY BE "AC" OR "NON AC"');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_insert_gr1;
===================================================================================
====
(PROCEDURE FOR UPDATING AMBU_DET_GR1 TABLE)

create or replace procedure proc_update_gr1


(p_ambu_num number,p_charge number)
is
e_chargecheck exception;
e_checkambno exception;
begin
if p_charge<=0 then
raise e_chargecheck;
end if;
update ambu_det_gr1
set charge=p_charge
where ambulance_num=p_ambu_num;
if sql%notfound then
raise e_checkambno;
end if;
commit;
EXCEPTION
when e_chargecheck then
dbms_output.put_line(chr(10)||'WRONG AMOUNT ENTERED');
dbms_output.put_line('CHARGE CAN ONLY BE MORE THAN ZERO');
WHEN e_checkambno THEN
dbms_output.put_line(chr(10)||'INVALID AMBULANCE NO.');
dbms_output.put_line('PLEASE ENTER A VALID AMBULANCE NO.');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_update_gr1;
===================================================================================
=====
(PROCEDURE FOR DELETING ROW IN AMBU_DET_GR1 TABLE)

create or replace procedure proc_delete_gr1


(p_ambu_num number)
is
e_checkambno exception;
begin
delete from ambu_det_gr1
where ambulance_num=p_ambu_num;
if sql%notfound then
raise e_checkambno;
end if;
commit;
exception
WHEN e_checkambno THEN
dbms_output.put_line(chr(10)||'INVALID AMBULANCE NO.');
dbms_output.put_line('PLEASE ENTER A VALID AMBULANCE NO.');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_delete_gr1;
===================================================================================
====
(procedure for checking avalable ambulance on present day)

create or replace procedure proc_aval_presentday_gr1


is
e_checkaval exception;
cursor aval_cur is
select *
from ambu_det_gr1 d,(select amb_num,count(*) c
from ambu_book_gr1 where p_date=to_char(sysdate) group by amb_num) b
where d.ambulance_num=b.amb_num(+) and c is null;
aval_rec aval_cur%rowtype;
begin
open aval_cur;
fetch aval_cur into aval_rec;
if aval_cur%notfound then
raise e_checkaval;
end if;
close aval_cur;
dbms_output.put_line('------------------------------------------------');
dbms_output.put_line('AMBULANCE_NUM'|| ' '||'TYPE'||' '||'
'||'CHARGE');
dbms_output.put_line('------------------------------------------------');
for aval_rec in aval_cur loop
exit when aval_cur%notfound;
dbms_output.put_line(aval_rec.ambulance_num|| ' '||
RPAD(aval_rec.type,6,' ')||' '|| aval_rec.charge);
end loop;
exception
when e_checkaval then
dbms_output.put_line(chr(10)||'SORRY AMBULANCE NOT AVAILABLE');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_aval_presentday_gr1;

===================================================================================
===========
(display a booking details)

create or replace procedure proc_dis_booked_det_gr1(p_booking_id


ambu_book_gr1.booking_id%type)
is
aval_rec ambu_book_gr1%rowtype;
v_id number;
cursor trans_cur is select b_id
from trans_log_gr1
where b_id=p_booking_id;
cursor ambook_cur is select *
from ambu_book_gr1
where booking_id=p_booking_id;
v_trans number;
e_checktrans exception;
e_checkbookid exception;
begin
open ambook_cur;
fetch ambook_cur into aval_rec;
if ambook_cur%notfound then
open trans_cur;
fetch trans_cur into v_trans;
if trans_cur%notfound then
raise e_checktrans;
else
raise e_checkbookid;
end if;
end if;
dbms_output.put_line('------------------------------------');
dbms_output.put_line('BOOKING DETAILS OF BOOKING_ID='||aval_rec.booking_id);
dbms_output.put_line('------------------------------------');
dbms_output.put_line('b_date'|| '--------'||aval_rec.b_date);
dbms_output.put_line('house_no'|| '------'||aval_rec.house_no);
dbms_output.put_line('st_name'|| '-------'||aval_rec.st_name);
dbms_output.put_line('city'|| '----------'||aval_rec.city);
dbms_output.put_line('cno'|| '-----------'||aval_rec.cno);
dbms_output.put_line('ad_fac'|| '--------'||aval_rec.ad_fac);
dbms_output.put_line('p_date'|| '--------'||aval_rec.p_date);
dbms_output.put_line('amb_num'||'-------'||aval_rec.amb_num);
dbms_output.put_line('pname'|| '---------'||aval_rec.pname);
dbms_output.put_line('page'|| '----------'||aval_rec.page);
exception
when e_checktrans then
dbms_output.put_line(chr(10)||'INVALID BOOKING ID ENTERED');
when e_checkbookid then
dbms_output.put_line(chr(10)||'BOOKING DETAILS NOT AVAILABLE AS BILLING
HAS BEEN COMPLETED');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_dis_booked_det_gr1;
===================================================================================
==
(procedure for deleteing booking details)
create or replace procedure pro_delete_bookdet_gr1
(p_booking_id ambu_book_gr1.booking_id%type)
is
e_checkbookid exception;
begin
delete from ambu_book_gr1
where booking_id=p_booking_id;
if sql%notfound then
raise e_checkbookid;
end if;
commit;
exception
when e_checkbookid then
dbms_output.put_line(chr(10)||'INVALID BOOKING ID ENTERED');
dbms_output.put_line('PLEASE ENTER A VALID BOOKING ID');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end pro_delete_bookdet_gr1;
===================================================================================
============
(PROCEDURE FOR PRINTING BILL FOR SPECIFIC BOOKING_ID)

create or replace procedure proc_totalbill_gr1(pbooking_id in


ambu_book_gr1.booking_id%type,
pdist_trav in trans_log_gr1.dist_trav%type)
is
cursor bill_cursor is select booking_id
from ambu_book_gr1 where booking_id=pbooking_id;
tbill number:=0;
p_type varchar2(10);
p_add varchar2(30);
a number;
b number;
c number;
v_ambu_num number;
v_pick_date date;
v_add varchar2(10);
temp number;
v_num number;
v_id number;
v_temp number:=0;
v_dist number;
p_id number;
e_checkdist exception;
e_checkpdate exception;
begin
open bill_cursor;
fetch bill_cursor into v_ambu_num;
if bill_cursor%notfound then
select a.type,b.add_fac,b.dist_trav
into p_type,p_add,v_dist
from ambu_det_gr1 a,trans_log_gr1 b
where a.ambulance_num=b.ambulance_num and b_id=pbooking_id;
v_temp:=1;
else
select a.type,b.ad_fac,a.ambulance_num,b.p_date
into p_type,p_add,v_num,v_pick_date
from ambu_det_gr1 a,ambu_book_gr1 b
where a.ambulance_num=b.amb_num and booking_id=pbooking_id;
v_add:=p_add;
v_dist:=pdist_trav;
end if;
if v_dist!=pdist_trav then
dbms_output.put_line(chr(10)||'WRONG DISTANCE VALUE FOR BOOKING ID:'||
pbooking_id||'. ACTUAL DISTANCE TRAVELLED IS '||v_dist||'Km.');
end if;
if v_pick_date>to_char(sysdate) then
raise e_checkpdate;
end if;
if pdist_trav<=0 then
raise e_checkdist;
end if;
if(p_type='AC') then
tbill:=350+14*v_dist ;
a:=350;
b:=14;
else
tbill:=250+10*v_dist;
a:=250;
b:=10;
end if;
if(p_add='D') then
tbill:=tbill+200;
p_add:='DOCTOR';
c:=200;
elsif(p_add='N') then
tbill:=tbill+100;
p_add:='NURSE ';
c:=100;
else
tbill:=tbill+300;
p_add:='DOCTOR and NURSE ';
c:=300;
end if;

dbms_output.put_line('*************************************************************
********');
dbms_output.put_line('Billing date: '|| sysdate||' '||'Booking_id: '||
pbooking_id);

dbms_output.put_line('-------------------------------------------------------------
--------');
dbms_output.put_line('BILLING DETAILS'||'
'||'COST/UNIT'||' '||'COST');

dbms_output.put_line('-------------------------------------------------------------
--------');
dbms_output.put_line('Ambulance type: '||rpad(p_type,28,' ')||rpad(a,14,' ')||a);
dbms_output.put_line('Additional facility: '||p_add||rpad(c,14,' ')||c);
dbms_output.put_line('Distance travelled(km): '||rpad(v_dist,20,' ')||
rpad(lpad(b,3,' '),14,' ')||lpad(b*pdist_trav,3,' '));

dbms_output.put_line('-------------------------------------------------------------
--------'||chr(10)||lpad('Total Bill(Rs.): ',49,' ')||lpad(tbill,12,' '));
dbms_output.put_line('*************************************************************
********');
select count(*) into temp
from trans_log_gr1
where b_id=pbooking_id;
if (temp=0) then
insert into trans_log_gr1
values(v_num,v_pick_date,pdist_trav,pdist_trav/10,pbooking_id,v_add);
commit;
end if ;
if v_temp!=1 then
pro_delete_bookdet_gr1(pbooking_id);
end if;
close bill_cursor;
exception
when e_checkpdate then
dbms_output.put_line(chr(10)||'BOOKING ID:'||pbooking_id||' IS NOT
SERVED YET');
when no_data_found then
dbms_output.put_line(chr(10)||'INVALID BOOKING ID ENTERED.');
dbms_output.put_line('PLEASE ENTER A VALID BOOKING ID.');
when e_checkdist then
dbms_output.put_line(chr(10)||'DISTANCE SHOULD BE MORE THAN ZERO.');
dbms_output.put_line('PLEASE ENTER A VALID DISTANCE VALUE.');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_totalbill_gr1;

===================================================================================
============

create or replace procedure proc_report1_gr1


is
v_tfcon varchar2(6);
cursor cur is select COUNT(*) C,ambulance_num,sum(fuel_cons) s
from trans_log_gr1
where trans_date= to_char(sysdate)
group by ambulance_num;
cur_rec cur%rowtype;
tfcon number(10,2):=0;
e_checktrans exception;
begin
open cur;
fetch cur into cur_rec;
if cur%notfound then
raise e_checktrans;
end if;
close cur;
dbms_output.put_line('---------------------------------------------');
dbms_output.put_line('AMBULANCE_NO.'||' '||'TRIPS'||' '||'
FUEL(lts.)');
dbms_output.put_line('---------------------------------------------');
for cur_rec in cur loop
exit when cur%notfound;
dbms_output.put_line(chr(10)||lpad(cur_rec.ambulance_num,13,' ')||
lpad(cur_rec.c,10,' ')||lpad(to_char(cur_rec.s,'99.00'),16,' '));
tfcon:=tfcon+cur_rec.s;
end loop;
v_tfcon:=to_char(tfcon,'99.00');
dbms_output.put_line('----------------------------------------------'||chr(10)||
lpad('TOTAL FUEL CONSUMED: ',31,' ')|| lpad(v_tfcon,8,' ')||' Lts.');
dbms_output.put_line('FUEL REMAINING TO BE ADJUSTED: '||lpad(to_char(100-
tfcon,'99.00'),8,' ')||' Lts.');
exception
when e_checktrans then
dbms_output.put_line(chr(10)||'NO AMBULANCE HAS BEEN USED TODAY.');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_report1_gr1;

===================================================================================
================

create or replace procedure proc_report2_gr1(v_ambulance_num in number,v_date in


date)
is
c number;
e_checkdate exception;
v_ambuno number;
e_checktrans exception;
begin
if v_date>sysdate then
raise e_checkdate;
end if;
select ambulance_num into v_ambuno
from ambu_det_gr1
where ambulance_num=v_ambulance_num;
select COUNT(*) C into c
from trans_log_gr1
where trans_date=v_date and ambulance_num=v_ambulance_num;
if c=0 then
raise e_checktrans;
end if;
dbms_output.put_line('---------------------------------------');
dbms_output.put_line('AMBULANCE_NO.'||' '||'TRIPS');
dbms_output.put_line('---------------------------------------'||chr(10)||
lpad(v_ambulance_num,13,' ')||lpad(c,10,' '));
exception
when no_data_found then
dbms_output.put_line(chr(10)||'INVALID AMBULANCE NO.');
dbms_output.put_line('PLEASE ENTER A VALID AMBULANCE NO.');
WHEN e_checkdate THEN
dbms_output.put_line(chr(10)||'CANNOT GENERATE REPORT FOR FUTURE
DATES.');
when e_checktrans then
dbms_output.put_line(chr(10)||'AMBULANCE NO.'||v_ambulance_num||' HAS
NOT BEEN USED ON THIS DATE');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_report2_gr1;
===================================================================================
=============
create or replace procedure proc_staff_app_gr1
(v_staff_id in staff_gr1.staff_id%type,v_booking_id in number)
is
v_date date;
e_staffcheck exception;
pragma exception_init(e_staffcheck,-2290);
begin
select p_date into v_date from ambu_book_gr1 where booking_id=v_booking_id;
insert into staff_app_gr1(booking_id,staff_id,app_date)
values(v_booking_id,v_staff_id,v_date );
commit;
exception
when no_data_found then
dbms_output.put_line(chr(10)||'INVALID BOOKING ID ENTERED.');
dbms_output.put_line('PLEASE ENTER A VALID BOOKING ID.');
when e_staffcheck then
dbms_output.put_line(chr(10)||'INVALID STAFF ID ENTERED.');
dbms_output.put_line('PLEASE ENTER A VALID STAFF ID.');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_staff_app_gr1;
===================================================================================
===========
===================================================================================
============
create or replace procedure proc_aval_advbook_gr1
(p_type varchar2,p_fac varchar2,p_pdate date)
is
c number;
c1 number;
c2 number;
c3 number;
c4 number;
c5 number;
c6 number;
e_checkpdate exception;
e_checkpdate1 exception;
e_checkfac exception;
e_checktype exception;
e_checktypenull exception;
begin
if p_pdate<sysdate then
raise e_checkpdate1;
end if;
if p_pdate is null then
raise e_checkpdate;
end if;
if ((p_fac<>'D') and (p_fac<>'B') and (p_fac<>'N')) then
raise e_checkfac;
end if;
if ((p_type<>'AC') and (p_type<>'NON AC')) then
raise e_checktype;
end if;
if p_type is null then
raise e_checktypenull;
end if;
select count(*) into c
from ambu_book_gr1
where p_date=p_pdate;
if c<3 then
select count(*) into c1
from ambu_det_gr1 d,(select amb_num,count(*) c2
from ambu_book_gr1 where p_date=p_pdate group by amb_num) b
where d.ambulance_num=b.amb_num(+) and d.type=p_type and c2 is null;
if c1>0 then
select count(*) into c3
from staff_gr1 d,(select staff_id,count(*) c4
from staff_app_gr1 where app_date=p_pdate group by staff_id) b
where d.staff_id=b.staff_id(+) and d.staff_id like 'D%' and c4 is null;
select count(*) into c5
from staff_gr1 d,(select staff_id,count(*) c6
from staff_app_gr1 where app_date=p_pdate group by staff_id) b
where d.staff_id=b.staff_id(+) and d.staff_id like 'N%' and c6 is null;
if(p_fac='D' and c3>0) then
dbms_output.put_line('Ambulance and facilities available for
booking.');
elsif(p_fac='N' and c5>0) then
dbms_output.put_line('Ambulance and facilities available for
booking.');
elsif(p_fac='B' and c3>0 and c5>0) then
dbms_output.put_line('Ambulance and facilities available for
booking.');
elsif(p_fac is null) then
dbms_output.put_line('Ambulance available for booking.');
end if;
else
dbms_output.put_line(p_type||' ambulance not available for this date.');
end if;
else
dbms_output.put_line('Ambulance not available on this date.');
end if;
exception
when e_checkpdate then
dbms_output.put_line(chr(10)||'PICK UP DATE CANNOT BE NULL');
dbms_output.put_line('PLEASE ENTER A VALID DATE VALUE');
when e_checkfac then
dbms_output.put_line(chr(10)||'PLEASE ENTER A VALID VALUE FOR
FACILITY.');
when e_checktype then
dbms_output.put_line(chr(10)||'PLEASE ENTER A VALID VALUE FOR AMBULANCE
TYPE.');
when e_checktypenull then
dbms_output.put_line(chr(10)||'AMBULANCE TYPE CANNOT BE NULL');
when e_checkpdate1 then
dbms_output.put_line(chr(10)||'PICK UP DATE CANNOT BE A PAST DATE.');
dbms_output.put_line('PLEASE ENTER A VALID DATE VALUE');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_aval_advbook_gr1;
===============================================================================

create or replace procedure proc_booking_gr1


(p_hno varchar2,p_sname varchar2,
p_city varchar2,p_cno number,p_type varchar2,p_add varchar2,
p_pdate date,p_pname varchar2,p_age number)
is
cursor booking_cursor is select booking_id
from ambu_book_gr1;
v_staff_id1 varchar2(10);
v_staff_id2 varchar2(10);
v_err varchar2(20);
v_type varchar2(10);
v_add varchar2(10);
v_pname varchar2(30);
v_num number;
c number;
c1 number;
bno number;
v_ambuno number;
e_checkdateform exception;
e_checkpdate exception;
e_checkfac exception;
e_checktype exception;
e_checknull exception;
e_checkage exception;
e_amb_notaval exception;
e_type_notaval exception;
pragma exception_init(e_checknull,-1400);
begin
v_pname:=initcap(p_pname);
v_type:=upper(p_type);
v_add:=upper(p_add);
if ((v_type<>'AC') and (v_type<>'NON AC')) then
raise e_checktype;
end if;
if ((v_add<>'D') and (v_add<>'B') and (v_add<>'N')) then
raise e_checkfac;
end if;
if p_pdate<to_char(sysdate) then
raise e_checkpdate;
end if;
if p_age<=0 then
raise e_checkage;
end if;
if p_pdate>to_char(sysdate) then
select count(*) into c
from ambu_book_gr1
where p_date=p_pdate;
select count(*) into c1
from ambu_det_gr1 d,(select amb_num,count(*) c2
from ambu_book_gr1 where p_date=p_pdate group by amb_num) b
where d.ambulance_num=b.amb_num(+) and d.type=v_type and c2 is null;
if c=3 then
raise e_amb_notaval;
end if;
if c1=0 then
raise e_type_notaval;
end if;
else
select count(*) into c
from ambu_book_gr1
where p_date=p_pdate;
select count(*) into c1
from ambu_det_gr1 d,(select amb_num,count(*) c2
from ambu_book_gr1 where p_date=p_pdate group by amb_num) b
where d.ambulance_num=b.amb_num(+) and d.type=v_type and c2 is null;
if c=5 then
raise e_amb_notaval;
end if;
if c1=0 then
raise e_type_notaval;
end if;
end if;
open booking_cursor;
fetch booking_cursor into v_num;
if booking_cursor%notfound then
select ambulance_num into v_ambuno
from ambu_det_gr1
where type=v_type and rownum=1;
else
select d.ambulance_num into v_ambuno
from ambu_det_gr1 d,(select amb_num,count(*) c
from ambu_book_gr1 where p_date=p_pdate group by amb_num) b
where d.ambulance_num=b.amb_num(+) and d.type=v_type and c is null and
rownum=1;
end if;
select booking_seq.nextval into bno from dual;
insert into
ambu_book_gr1(booking_id,b_date,house_no,st_name,city,cno,ad_fac,
p_date,amb_num,pname,page)
values(booking_seq.currval,sysdate,p_hno,p_sname,
p_city,p_cno,v_add,p_pdate,v_ambuno,p_pname,p_age);
commit;
if v_add='D' then
select d.staff_id into v_staff_id1
from staff_gr1 d,(select staff_id,count(*) c6
from staff_app_gr1 where app_date=p_pdate group by staff_id) b
where d.staff_id=b.staff_id(+) and d.staff_id like 'D%' and c6 is
null
and rownum=1;
proc_staff_app_gr1(v_staff_id1,bno);
elsif v_add='N' then
select d.staff_id into v_staff_id2
from staff_gr1 d,(select staff_id,count(*) c6
from staff_app_gr1 where app_date=p_pdate group by staff_id) b
where d.staff_id=b.staff_id(+) and d.staff_id like 'N%' and c6 is
null
and rownum=1;
proc_staff_app_gr1(v_staff_id2,bno);
elsif v_add='B' then
select d.staff_id into v_staff_id1
from staff_gr1 d,(select staff_id,count(*) c6
from staff_app_gr1 where app_date=p_pdate group by staff_id) b
where d.staff_id=b.staff_id(+) and d.staff_id like 'D%' and c6 is
null
and rownum=1;
proc_staff_app_gr1(v_staff_id1,bno);
select d.staff_id into v_staff_id2
from staff_gr1 d,(select staff_id,count(*) c6
from staff_app_gr1 where app_date=p_pdate group by staff_id) b
where d.staff_id=b.staff_id(+) and d.staff_id like 'N%' and c6 is
null
and rownum=1;
proc_staff_app_gr1(v_staff_id2,bno);
end if;
proc_dis_booked_det_gr1(bno);
exception
when e_checknull then
if p_hno is null then
v_err:='HOUSE NO.';
elsif p_sname is null then
v_err:='STREET NAME';
elsif p_city is null then
v_err:='CITY';
elsif p_pdate is null then
v_err:='PICKUP DATE';
elsif p_type is null then
v_err:='AMBULANCE TYPE';
elsif p_pname is null then
v_err:='PATIENT NAME';
elsif p_cno is null then
v_err:='CONTACT NO.';
end if;
dbms_output.put_line(chr(10)||'CANNOT INSERT NULL VALUE FOR '||v_err);
when e_checktype then
dbms_output.put_line(chr(10)||'PLEASE ENTER A VALID VALUE FOR AMBULANCE
TYPE.');
when e_amb_notaval then
dbms_output.put_line(chr(10)||'AMBULANCE NOT AVAILABLE FOR BOOKING ON
THIS DATE');
when e_type_notaval then
dbms_output.put_line(chr(10)||v_type||' AMBULANCE NOT AVAILABLE FOR
BOOKING ON THIS DATE');
when e_checkfac then
dbms_output.put_line(chr(10)||'PLEASE ENTER A VALID VALUE FOR
FACILITY.');
when e_checkpdate then
dbms_output.put_line(chr(10)||'PICK UP DATE CANNOT BE A PAST DATE.');
dbms_output.put_line('PLEASE ENTER A VALID DATE VALUE');
when e_checkage then
dbms_output.put_line(chr(10)||'PATIENT AGE SHOULD BE MORE THAN ZERO.');
dbms_output.put_line('PLEASE ENTER A VALID AGE VALUE');
when e_checkdateform then
dbms_output.put_line(chr(10)||'ENTER DATE IN DD-MON-YY FORMAT');
when others then
dbms_output.put_line(chr(10)||'ENTER CORRECT VALUES ONLY');
end proc_booking_gr1;

===================================================================================
========

You might also like