using exception using rtc

declare
fleet number(3);
d date;
route number(4);
code number(4);
e number(4):=&e;
cantravel exception;
cantravel1 exception;
cantravel2 exception;
begin
select fleet_id,day,route_id,cat_code into fleet,d,route,code from fleet_header where fleet_id=e;
if d='24-jun-96' then
raise cantravel;
elsif d='20-apr-96' then
raise cantravel1;
elsif d='25-jun-96' then
raise cantravel;
end if;
exception when cantravel then
dbms_output.put_line(d);
when cantravel1 then
dbms_output.put_line(d);
when cantravel2 then
dbms_output.put_line(d);
end;
/

No comments:

Post a Comment

Template Design by faris vio