aspose file tools*
The moose likes JDBC and the fly likes function call within a procedure error !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "function call within a procedure error !!" Watch "function call within a procedure error !!" New topic
Author

function call within a procedure error !!

Masood Khan
Greenhorn

Joined: Nov 24, 2005
Posts: 4
create or replace procedure update_status(t_amt in real) is

myno supplies.s_num%type;
tot_amt real;

cursor snum is select s_num from supplies s,charges c
where s. s_num = c.ch_s_num
and s.p_num = c.ch_p_num;


begin
open snum;

loop
fetch snum into myno;
tot_amt:= suppliers_total_charges(myno);
if tot_amt = 0 then
update supplier set s_status =1 where s_num=myno;
elsif tot_amt BETWEEN 0.01 AND 99.99 THEN
update supplier set s_status =2 where s_num=myno;
elsif tot_amt BETWEEN 100 AND 199.99 THEN
update supplier set s_status =3 where s_num=myno;
elsif tot_amt BETWEEN 200 AND 299.99 THEN
update supplier set s_status =4 where s_num=myno;
elsif tot_amt BETWEEN 300 AND 399.99 THEN
update supplier set s_status =5 where s_num=myno;
elsif tot_amt BETWEEN 400 AND 499.99 THEN
update supplier set s_status =6 where s_num=myno;
elsif tot_amt BETWEEN 500 AND 699.99 THEN
update supplier set s_status =7 where s_num=myno;
elsif tot_amt BETWEEN 700 AND 999.99 THEN
update supplier set s_status =8 where s_num=myno;
elsif tot_amt BETWEEN 1000 AND 1599.99 THEN
update supplier set s_status =9 where s_num=myno;
elsif tot_amt >= 1599.99 THEN
update supplier set s_status =10 where s_num=myno;
end if;
exit when snum%NOTFOUND;
end loop;
close snum;
end;
/
*********** the error after executing this procedure is as below..********

SQL> execute update_status
BEGIN update_status; END;

*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'UPDATE_STATUS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

plz help me in this,so i can go on to my next step thanks..
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
You are not using t_amt parameter, then why are you passing it. Actually, you are not defining the parameter correctly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: function call within a procedure error !!