Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the errorin this procedure??

 
Chhaya Dhanani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have written a procedure which will read from a table and insert into another two tables.
when i run it it keeps throwing the following error:
Warning: Procedure created with compilation errors.
the procedure is as follows:
create or replace procedure cbaoffline_activation
as
Cursor cbacur is select accountnumber,userid,billerid,categoryid,billername
from customer_biller_account
where substr(userid,1,3) in (select micrcitycode from city_info)
and activation_status='PEND';
cbarec customer_biller_account%ROWTYPE;
Begin
Begin transaction;
Open cbacur;
Loop
Fetch cbacur into cbarec;
Insert into activation_log values('||cbarec.userid||','admin','ACTIVE','||cbarec.accountnumber||',sysdate,'||cbarec.billerid|
|','||cbarec.categoryid||','||cbarec.billername||','||substr(cbarec.userid,1,3)||');
Exit when cbacur%notfound;
END LOOP
Close cbacur;
Update customer_biller_account set activation_status='ACTIVE' where activation_status='PEND'
and substr(userid,1,3) in (select micrcitycode from city_info) and activation_status='PEND';
Commit transaction;
end;
Pls help me with this as soon as possible...SOS
Thanx in advance
Chhaya
 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
missing a semicolon after the end loop statement!
Type show errors and see whether it shows any errors.Just say commit instead of commit transaction. Don't you want to end the transaction? Is it ported from sqlserver?
Regards
Beksy
[ September 17, 2002: Message edited by: Beksy Kurian ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beksy you always amaze me. I hope one day to be as good a DBA as you are.
Mark
 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still learning, Mark!
I have learned a lot by participating in this forum.
Thanks!
Regards
Beksy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic