Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Oracle Certified Professional Exams (OCP & OCA) >> help on PROCEDURE

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: help on PROCEDURE
 RK  Posted: Jun 11, 2007 02:31:51 PM

 Total Post: 37
 Joined: Apr, 2007






  create table item_details
(item_code number(5) not null,
item_name varchar2(50) not null,
quantity number(5),
sp_price number(8,2),
constraint con_pk_itemcode primary key(item_code))
/
--the above is the table


--the below is the procedure on the above table to insert data
create or replace procedure proc_id
(v_itemcode IN item_details.item_code%type,
v_itemname IN item_details.item_name%type,
v_quantity IN item_details.quantity%type,
v_sp IN item_details.sp_price%type)
is
begin
insert into item_details
values(v_itemcode,v_itemname,v_quantity, v_sp);
end proc_id;
/


--the below is a plsql block

declare
v_itemcode item_details.item_code%type;
v_itemname item_details.item_name%type;
v_quantity item_details.quantity%type;
v_sp item_details.sp_price%type;
begin
for i in 1..2 loop
execute proc_id(&v_itemcode,'&v_itemname',&v_quantity,&v_sp);
end loop;
end;
/
NOW MY DOUBT IS when i execute the 3rd block indivually it gives error.please help me on this area....I AM USING ORACLE 9i ENTERPRISE..



 sudha
Posted: Jun 11, 2007 03:54:25 PM  

 Total Post: 15
 Joined: Jan, 2007






 
updated rk
pls check it


 RK
Posted: Jun 11, 2007 11:17:26 PM  

 Total Post: 37
 Joined: Apr, 2007






 
Sudha thanx for replying.But i can not uderstand what u wrote.plz b elaborative...

 chinna
Posted: Jun 11, 2007 11:51:23 PM  

 Total Post: 28
 Joined: May, 2007






 
hi,rk
execute(&value1,&value2....)
According to my view,
during compilation only it promts for a value and while execution same values it takes,and it may not loop just take the only once.

thanks
srawan


 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software