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
What packages(if any) has oracle provided for use by developers?
Are subqueries better than joins?
How to get each name only once from an employee table?
Explain spool.
What is the difference between join and natural join?
How do I run a pl sql procedure in sql developer?
What is a unique constraint?
How long it takes to learn pl sql?
Explain commit, rollback and savepoint.
how to enter binary numbers in sql statements? : Sql dba
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What is meant by user defined function?
What will you get by the cursor attribute sql%found?
What is row_number () in sql?
what are the types of join and explain each? : Sql dba