Give an example of any procedure.

Answer Posted / dev lamani

create or replace procedure Data_Ho(region number,proc
number) is
Data_Not_there exception;
cnt number;
Begin
select count(*) into cnt
from vhub.op_fertilizer_sta_tran
where proc_monyr=proc and region_code=region;
if cnt>=0 then
insert into op_fertilizer_sta
select * from op_fertilizer_sta_tran
where proc_monyr=proc and region_code=region;
else
raise Data_not_there;
end if;
exception
when Data_not_there then
dbms_output.putline('There is no Data Available for this
month for Insertion'|| ' ' || proc);
End;

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the operator which is used in the query for pattern matching?

684


How many types of relationship are there?

735


Is it possible to link two groups inside a cross products after the cross products group has been created?

769


What does <> sql mean?

712


What is primary key sql?

713






What is a design view?

700


How exception is different from error?

762


How can get second highest salary in sql?

690


What is partition by in sql?

784


Why is normalization important?

747


What are the parts of a sql statement?

765


What is schema in sql example?

825


What is scalar and vector?

720


Explain lock escalation? : Transact sql

867


How do you get column names only for a table (sql server)?

859